-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bugfix: fix need for initial key-press
This hack works around the issue described in: gdamore/tcell#194 Sadly, this triggers a permission request for the terminal (e.g. iterm2) to use macOS accessibility features.
- Loading branch information
Jesper Wendel Devantier
committed
May 24, 2020
1 parent
0d58958
commit df9fcf6
Showing
4 changed files
with
22 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package utils | ||
|
||
import "github.com/micmonay/keybd_event" | ||
|
||
func PressEnterKey() { | ||
// https://github.com/gdamore/tcell/issues/194 | ||
kb, err := keybd_event.NewKeyBonding() | ||
if err != nil { | ||
return | ||
} | ||
//set keys | ||
kb.SetKeys(keybd_event.VK_SPACE) | ||
|
||
//launch | ||
kb.Launching() | ||
} |