diff options
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/aerc.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/widgets/aerc.go b/widgets/aerc.go index 7209b2d8..bdd18dd5 100644 --- a/widgets/aerc.go +++ b/widgets/aerc.go @@ -339,7 +339,7 @@ func (aerc *Aerc) Event(event tcell.Event) bool { // Keybindings still use : even if you change the ex key exKey = aerc.conf.Bindings.Global.ExKey } - if event.Key() == exKey.Key && event.Rune() == exKey.Rune { + if aerc.isExKey(event, exKey) { aerc.BeginExCommand("") return true } @@ -850,3 +850,11 @@ func errorScreen(s string, conf config.UIConfig) ui.Drawable { grid.AddChild(ui.NewFill(' ', tcell.StyleDefault)).At(2, 0) return grid } + +func (aerc *Aerc) isExKey(event *tcell.EventKey, exKey config.KeyStroke) bool { + if event.Key() == tcell.KeyRune { + // Compare runes if it's a KeyRune + return event.Modifiers() == exKey.Modifiers && event.Rune() == exKey.Rune + } + return event.Modifiers() == exKey.Modifiers && event.Key() == exKey.Key +} |