feat: use level-0 keysym for keybindings

This commit is contained in:
Federico Carbone 2023-02-04 21:02:52 +01:00
parent 8653b27692
commit 75269267a7
No known key found for this signature in database
GPG key ID: 77C2066C45A06AF9
2 changed files with 21 additions and 21 deletions

4
dwl.c
View file

@ -1379,8 +1379,8 @@ keypress(struct wl_listener *listener, void *data)
uint32_t keycode = event->keycode + 8;
/* Get a list of keysyms based on the keymap for this keyboard */
const xkb_keysym_t *syms;
int nsyms = xkb_state_key_get_syms(
kb->wlr_keyboard->xkb_state, keycode, &syms);
int nsyms = xkb_keymap_key_get_syms_by_level(
kb->wlr_keyboard->keymap, keycode, xkb_state_key_get_layout(kb->wlr_keyboard->xkb_state, keycode), 0, &syms);
int handled = 0;
uint32_t mods = wlr_keyboard_get_modifiers(kb->wlr_keyboard);