about summary refs log tree commit diff stats
path: root/src/config
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2022-10-19 11:30:34 +0200
committerbptato <nincsnevem662@gmail.com>2022-10-19 11:30:34 +0200
commit7fbedc1f0d7e58fbbce3bdb469f81e9b7c411c15 (patch)
treed6e0be90aef2952c2f0473cd016923dae2c60571 /src/config
parent08a758ed7a06e1bff8994c01d6c5d317d400ccf9 (diff)
downloadchawan-7fbedc1f0d7e58fbbce3bdb469f81e9b7c411c15.tar.gz
Fix Meta+Control keybindings
Diffstat (limited to 'src/config')
-rw-r--r--src/config/config.nim17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/config/config.nim b/src/config/config.nim
index 56f13382..29d862fd 100644
--- a/src/config/config.nim
+++ b/src/config/config.nim
@@ -71,18 +71,19 @@ func getRealKey(key: string): string =
     elif meta == 1:
       realk &= 'M' & c
       meta = 0
-    elif meta == 2:
-      realk &= '\e'
-      realk &= c
-      meta = 0
     elif control == 1:
       realk &= 'C' & c
       control = 0
-    elif control == 2:
-      realk &= getControlChar(c)
-      control = 0
     else:
-      realk &= c
+      if meta == 2:
+        realk &= '\e'
+        realk &= c
+        meta = 0
+      if control == 2:
+        realk &= getControlChar(c)
+        control = 0
+      else
+        realk &= c
   if control == 1:
     realk &= 'C'
   if meta == 1: