summaryrefslogtreecommitdiff
path: root/widgets
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2021-10-25 15:00:43 +0200
committerRobin Jarry <robin@jarry.cc>2021-10-28 16:21:37 +0200
commit7a6c808c042bf6f662e6d6b6dba09829a1f9ed15 (patch)
treef765cba8bfecd83f787e355c688c3ebc78fb7d10 /widgets
parent0b19b5e70e408bbaac5555b0b61a9451189406f8 (diff)
downloadaerc-7a6c808c042bf6f662e6d6b6dba09829a1f9ed15.zip
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 <robin@jarry.cc>
Diffstat (limited to 'widgets')
-rw-r--r--widgets/aerc.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/widgets/aerc.go b/widgets/aerc.go
index 6df0c95..350e94e 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(),
})