From 4037480d2b6cc7ea5d9f3b041b1f620bda5076eb Mon Sep 17 00:00:00 2001 From: Luflosi Date: Mon, 2 Sep 2019 21:27:14 +0200 Subject: [PATCH] Allow for up to 256 keys instead of 128 --- kitty/keys.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kitty/keys.py b/kitty/keys.py index c2568d86f..49a36acce 100644 --- a/kitty/keys.py +++ b/kitty/keys.py @@ -314,7 +314,7 @@ def generate_key_table_impl(w): w('%d, /* %s */' % (key_count, key_name(k))) key_rmap.append(i) key_count += 1 - if key_count > 128: + if key_count > 256: raise OverflowError('Too many keys') w('};\n') w('static inline const char* key_name(int key) { switch(key) {') @@ -354,7 +354,7 @@ def generate_key_table_impl(w): ind('case 0x{:x}:'.format(mods)) i += 1 if key_bytes: - ind('switch(key & 0x7f) { default: return NULL;') + ind('switch(key & 0xff) { default: return NULL;') i += 1 for key, (data, glfw_key) in key_bytes.items(): ind('case {}: // {}'.format(key, key_name(keys[glfw_key])))