summaryrefslogtreecommitdiffstats
path: root/pkg/gui/types/keybindings.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2022-03-26 15:02:32 +1100
committerJesse Duffield <jessedduffield@gmail.com>2022-03-27 18:16:16 +1100
commit98e7ec090509f089a3196848c324fdce2fb462fc (patch)
treecda5fcc6bf2ee5f442dff68fde121ef9ff3754b9 /pkg/gui/types/keybindings.go
parent7128d822cb82beba890aad4dd39e51270598cf0b (diff)
add type alias for Key
Diffstat (limited to 'pkg/gui/types/keybindings.go')
-rw-r--r--pkg/gui/types/keybindings.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/gui/types/keybindings.go b/pkg/gui/types/keybindings.go
index 7d1befc1b..b4db46336 100644
--- a/pkg/gui/types/keybindings.go
+++ b/pkg/gui/types/keybindings.go
@@ -2,6 +2,8 @@ package types
import "github.com/jesseduffield/gocui"
+type Key interface{} // FIXME: find out how to get `gocui.Key | rune`
+
// Binding - a keybinding mapping a key and modifier to a handler. The keypress
// is only handled if the given view has focus, or handled globally if the view
// is ""
@@ -9,7 +11,7 @@ type Binding struct {
ViewName string
Contexts []string
Handler func() error
- Key interface{} // FIXME: find out how to get `gocui.Key | rune`
+ Key Key
Modifier gocui.Modifier
Description string
Alternative string