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.
master
Simon Ser 5 years ago committed by Drew DeVault
parent dc6ef658b6
commit 16f22940d9

@ -88,13 +88,13 @@ void wlr_keyboard_notify_modifiers(struct wlr_keyboard *keyboard,
void wlr_keyboard_notify_key(struct wlr_keyboard *keyboard, void wlr_keyboard_notify_key(struct wlr_keyboard *keyboard,
struct wlr_event_keyboard_key *event) { struct wlr_event_keyboard_key *event) {
keyboard_key_update(keyboard, event);
wlr_signal_emit_safe(&keyboard->events.key, event);
if (keyboard->xkb_state == NULL) { if (keyboard->xkb_state == NULL) {
return; return;
} }
keyboard_key_update(keyboard, event);
wlr_signal_emit_safe(&keyboard->events.key, event);
if (event->update_state) { if (event->update_state) {
uint32_t keycode = event->keycode + 8; uint32_t keycode = event->keycode + 8;
xkb_state_update_key(keyboard->xkb_state, keycode, xkb_state_update_key(keyboard->xkb_state, keycode,

Loading…
Cancel
Save