From 7a6c808c042bf6f662e6d6b6dba09829a1f9ed15 Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Mon, 25 Oct 2021 15:00:43 +0200 Subject: bindings: prepare for more modifers Prepare to support more modifiers in key bindings. tcell has some premade ctrl-modified keys but not all keys are supported. Other keys must be explicitly checked with a modifier mask. Update the KeyStroke type to carry a modifier mask. Update code accordingly. No functional change. Link: https://github.com/gdamore/tcell/blob/master/key.go#L265-L275 Link: https://github.com/gdamore/tcell/blob/master/key.go#L384-L419 Signed-off-by: Robin Jarry --- widgets/aerc.go | 1 + 1 file changed, 1 insertion(+) (limited to 'widgets/aerc.go') diff --git a/widgets/aerc.go b/widgets/aerc.go index 6df0c950..350e94e2 100644 --- a/widgets/aerc.go +++ b/widgets/aerc.go @@ -229,6 +229,7 @@ func (aerc *Aerc) Event(event tcell.Event) bool { case *tcell.EventKey: aerc.statusline.Expire() aerc.pendingKeys = append(aerc.pendingKeys, config.KeyStroke{ + Modifiers: event.Modifiers(), Key: event.Key(), Rune: event.Rune(), }) -- cgit