diff options
Diffstat (limited to 'sway/input/keyboard.c')
-rw-r--r-- | sway/input/keyboard.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c index c1b53237..46286410 100644 --- a/sway/input/keyboard.c +++ b/sway/input/keyboard.c | |||
@@ -295,14 +295,10 @@ static void handle_keyboard_key(struct wl_listener *listener, void *data) { | |||
295 | get_active_binding(&keyboard->state_keysyms_raw, | 295 | get_active_binding(&keyboard->state_keysyms_raw, |
296 | config->current_mode->keysym_bindings, &binding, | 296 | config->current_mode->keysym_bindings, &binding, |
297 | raw_modifiers, false, input_inhibited, device_identifier); | 297 | raw_modifiers, false, input_inhibited, device_identifier); |
298 | |||
299 | if (binding) { | ||
300 | seat_execute_command(seat, binding); | ||
301 | handled = true; | ||
302 | } | ||
303 | } | 298 | } |
304 | 299 | ||
305 | // Set up (or clear) keyboard repeat for a pressed binding | 300 | // Set up (or clear) keyboard repeat for a pressed binding. Since the |
301 | // binding may remove the keyboard, the timer needs to be updated first | ||
306 | if (binding && wlr_device->keyboard->repeat_info.delay > 0) { | 302 | if (binding && wlr_device->keyboard->repeat_info.delay > 0) { |
307 | keyboard->repeat_binding = binding; | 303 | keyboard->repeat_binding = binding; |
308 | if (wl_event_source_timer_update(keyboard->key_repeat_source, | 304 | if (wl_event_source_timer_update(keyboard->key_repeat_source, |
@@ -316,6 +312,11 @@ static void handle_keyboard_key(struct wl_listener *listener, void *data) { | |||
316 | } | 312 | } |
317 | } | 313 | } |
318 | 314 | ||
315 | if (binding) { | ||
316 | seat_execute_command(seat, binding); | ||
317 | handled = true; | ||
318 | } | ||
319 | |||
319 | // Compositor bindings | 320 | // Compositor bindings |
320 | if (!handled && event->state == WLR_KEY_PRESSED) { | 321 | if (!handled && event->state == WLR_KEY_PRESSED) { |
321 | handled = keyboard_execute_compositor_binding( | 322 | handled = keyboard_execute_compositor_binding( |