summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2022-07-13 17:48:50 +0200
committerRobin Jarry <robin@jarry.cc>2022-07-17 19:00:47 +0200
commit5e600d7ab46b68d317d6700fe0d730cc5db44ec0 (patch)
treeece9d5f24614999c092c9ab328c24cd74a825bcb
parentdb00accb574190d1d33d7c57e2677781a015b301 (diff)
downloadaerc-5e600d7ab46b68d317d6700fe0d730cc5db44ec0.zip
binds: fix ctrl-i and ctrl-m key definitions
On all terminals, ctrl-i sends a tab character (0x09). For some reason, tcell.ModCtrl+tcell.KeyCtrlI is interpreted as ctrl-tab. Similarly, ctrl-m sends a new line (0x0a) and tcell.ModCtrl+tcell.KeyCtrlM is interpreted as ctrl-enter. Remove control modifier for these two key definitions only. All others do not work without them. Fixes: 7a6c808c042b ("bindings: prepare for more modifers") Fixes: https://todo.sr.ht/~rjarry/aerc/56 Signed-off-by: Robin Jarry <robin@jarry.cc> Acked-by: Moritz Poldrack <moritz@poldrack.dev>
-rw-r--r--config/bindings.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/config/bindings.go b/config/bindings.go
index 8167cfe..1833244 100644
--- a/config/bindings.go
+++ b/config/bindings.go
@@ -340,11 +340,11 @@ func init() {
keyNames["c-f"] = KeyStroke{tcell.ModCtrl, tcell.KeyCtrlF, 0}
keyNames["c-g"] = KeyStroke{tcell.ModCtrl, tcell.KeyCtrlG, 0}
keyNames["c-h"] = KeyStroke{tcell.ModNone, tcell.KeyCtrlH, 0}
- keyNames["c-i"] = KeyStroke{tcell.ModCtrl, tcell.KeyCtrlI, 0}
+ keyNames["c-i"] = KeyStroke{tcell.ModNone, tcell.KeyCtrlI, 0}
keyNames["c-j"] = KeyStroke{tcell.ModCtrl, tcell.KeyCtrlJ, 0}
keyNames["c-k"] = KeyStroke{tcell.ModCtrl, tcell.KeyCtrlK, 0}
keyNames["c-l"] = KeyStroke{tcell.ModCtrl, tcell.KeyCtrlL, 0}
- keyNames["c-m"] = KeyStroke{tcell.ModCtrl, tcell.KeyCtrlM, 0}
+ keyNames["c-m"] = KeyStroke{tcell.ModNone, tcell.KeyCtrlM, 0}
keyNames["c-n"] = KeyStroke{tcell.ModCtrl, tcell.KeyCtrlN, 0}
keyNames["c-o"] = KeyStroke{tcell.ModCtrl, tcell.KeyCtrlO, 0}
keyNames["c-p"] = KeyStroke{tcell.ModCtrl, tcell.KeyCtrlP, 0}