aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2019-11-30 12:17:34 +0100
committerDrew DeVault <sir@cmpwn.com>2019-12-01 10:25:50 -0500
commit16f22940d93f38a579ee1f5c5a24d33cecbbe514 (patch)
tree67c37f2aa6e499716bf63608d4ec0faf7d656806
parentdc6ef658b6fc448fa5fbe66897896a32a7fce8a3 (diff)
keyboard: emit key events without keymap
Sometimes compositors don't need an XKB keymap at all, they just handle raw keycodes. Emit key events even if no keymap is set.
-rw-r--r--types/wlr_keyboard.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/types/wlr_keyboard.c b/types/wlr_keyboard.c
index 50e09a37..1ea3bc7d 100644
--- a/types/wlr_keyboard.c
+++ b/types/wlr_keyboard.c
@@ -88,13 +88,13 @@ void wlr_keyboard_notify_modifiers(struct wlr_keyboard *keyboard,
void wlr_keyboard_notify_key(struct wlr_keyboard *keyboard,
struct wlr_event_keyboard_key *event) {
+ keyboard_key_update(keyboard, event);
+ wlr_signal_emit_safe(&keyboard->events.key, event);
+
if (keyboard->xkb_state == NULL) {
return;
}
- keyboard_key_update(keyboard, event);
- wlr_signal_emit_safe(&keyboard->events.key, event);
-
if (event->update_state) {
uint32_t keycode = event->keycode + 8;
xkb_state_update_key(keyboard->xkb_state, keycode,