Allow binding runes to actions
This new functionality would make it possible to emulate vim keybindings
pretty easily, for example.
@@ -491,7 +491,6 @@ func (v *View) HandleEvent(event tcell.Event) {
case *tcell.EventKey:
// Check first if input is a key binding, if it is we 'eat' the input and don't insert a rune
isBinding := false
- if e.Key() != tcell.KeyRune || e.Modifiers() != 0 {
for key, actions := range bindings {
if e.Key() == key.keyCode {
if e.Key() == tcell.KeyRune {
@@ -507,7 +506,6 @@ func (v *View) HandleEvent(event tcell.Event) {
}
}
}
- }
if !isBinding && e.Key() == tcell.KeyRune {
// Check viewtype if readonly don't insert a rune (readonly help and log view etc.)
if v.Type.readonly == false {
