mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-04 20:55:58 +01:00
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.
This commit is contained in:
parent
dc6ef658b6
commit
16f22940d9
1 changed files with 3 additions and 3 deletions
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue