From 98e7ec090509f089a3196848c324fdce2fb462fc Mon Sep 17 00:00:00 2001 From: Jesse Duffield Date: Sat, 26 Mar 2022 15:02:32 +1100 Subject: add type alias for Key --- pkg/gui/types/keybindings.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'pkg/gui/types/keybindings.go') 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 -- cgit v1.2.3