Fix using modifiers with subsequent keys in a muti-key shortcut not working
This commit is contained in:
parent
f5abe7cbf7
commit
fe5b8f3aec
@ -86,7 +86,10 @@ on_key_input(int key, int scancode, int action, int mods, const char* text, int
|
|||||||
Window *w = active_window();
|
Window *w = active_window();
|
||||||
if (!w) return;
|
if (!w) return;
|
||||||
if (global_state.in_sequence_mode) {
|
if (global_state.in_sequence_mode) {
|
||||||
if (action != GLFW_RELEASE) call_boss(process_sequence, "iiii", key, scancode, action, mods);
|
if (
|
||||||
|
action != GLFW_RELEASE &&
|
||||||
|
key != GLFW_KEY_LEFT_SHIFT && key != GLFW_KEY_RIGHT_SHIFT && key != GLFW_KEY_LEFT_ALT && key != GLFW_KEY_RIGHT_ALT && key != GLFW_KEY_LEFT_CONTROL && key != GLFW_KEY_RIGHT_CONTROL
|
||||||
|
) call_boss(process_sequence, "iiii", key, scancode, action, mods);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Screen *screen = w->render_data.screen;
|
Screen *screen = w->render_data.screen;
|
||||||
|
|||||||
@ -257,7 +257,7 @@ def get_shortcut(keymap, mods, key, scancode):
|
|||||||
|
|
||||||
|
|
||||||
def shortcut_matches(s, mods, key, scancode):
|
def shortcut_matches(s, mods, key, scancode):
|
||||||
return s[0] & 0b1111 == mods & 0b1111 and s[1] == key
|
return defines.resolve_key_mods(s[0]) & 0b1111 == mods & 0b1111 and s[1] == key
|
||||||
|
|
||||||
|
|
||||||
def generate_key_table():
|
def generate_key_table():
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user