From 5e600d7ab46b68d317d6700fe0d730cc5db44ec0 Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Wed, 13 Jul 2022 17:48:50 +0200 Subject: [PATCH] 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 Acked-by: Moritz Poldrack --- config/bindings.go | 4 ++-- 1 file 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}