diff --git a/kitty/keys.h b/kitty/keys.h index cb9d7299f..e561077d4 100644 --- a/kitty/keys.h +++ b/kitty/keys.h @@ -492,7 +492,7 @@ key_lookup(uint8_t key, KeyboardMode mode, uint8_t mods, uint8_t action) { return NULL; case 1: // PRESS - switch (mods & 0xf) { + switch (mods & 0xf) { case 0x0: switch(key & 0x7f) { default: return NULL; case 50: // ESCAPE @@ -1690,7 +1690,7 @@ key_lookup(uint8_t key, KeyboardMode mode, uint8_t mods, uint8_t action) { } // end switch(mods) case 2: // REPEAT - switch (mods & 0xf) { + switch (mods & 0xf) { case 0x0: switch(key & 0x7f) { default: return NULL; case 50: // ESCAPE @@ -2896,7 +2896,7 @@ key_lookup(uint8_t key, KeyboardMode mode, uint8_t mods, uint8_t action) { return NULL; case 1: // PRESS - switch (mods & 0xf) { + switch (mods & 0xf) { case 0x0: switch(key & 0x7f) { default: return NULL; case 50: // ESCAPE @@ -4094,7 +4094,7 @@ key_lookup(uint8_t key, KeyboardMode mode, uint8_t mods, uint8_t action) { } // end switch(mods) case 2: // REPEAT - switch (mods & 0xf) { + switch (mods & 0xf) { case 0x0: switch(key & 0x7f) { default: return NULL; case 50: // ESCAPE @@ -5297,7 +5297,7 @@ key_lookup(uint8_t key, KeyboardMode mode, uint8_t mods, uint8_t action) { case EXTENDED: switch(action & 3) { case 3: return NULL; case 0: // RELEASE - switch (mods & 0xf) { + switch (mods & 0xf) { case 0x0: switch(key & 0x7f) { default: return NULL; case 0: // SPACE @@ -9061,7 +9061,7 @@ key_lookup(uint8_t key, KeyboardMode mode, uint8_t mods, uint8_t action) { } // end switch(mods) case 1: // PRESS - switch (mods & 0xf) { + switch (mods & 0xf) { case 0x0: switch(key & 0x7f) { default: return NULL; case 0: // SPACE @@ -12825,7 +12825,7 @@ key_lookup(uint8_t key, KeyboardMode mode, uint8_t mods, uint8_t action) { } // end switch(mods) case 2: // REPEAT - switch (mods & 0xf) { + switch (mods & 0xf) { case 0x0: switch(key & 0x7f) { default: return NULL; case 0: // SPACE diff --git a/kitty/keys.py b/kitty/keys.py index 8d9e2f2b9..a627aa072 100644 --- a/kitty/keys.py +++ b/kitty/keys.py @@ -287,7 +287,7 @@ def generate_key_table(): ind('case {}: // {}'.format(action, 'RELEASE PRESS REPEAT'.split()[action])) i += 1 if action != defines.GLFW_RELEASE or mode == 'EXTENDED': - ind('switch (mods & 0xf) { ') + ind('switch (mods & 0xf) {') i += 1 for mods in range(16): key_bytes = {}