input: don’t use stale keycodes for arrow-up/down

The keycodes will change if the seat’s keymap changes. Make sure we
only do alternate scrolling if the seat has a keyboard, and use
the *current* layout’s keycodes for arrow up/down (instead of
the *first* layout’s).
This commit is contained in:
Daniel Eklöf 2020-09-15 18:44:54 +02:00
parent 028bbd03a3
commit cb41db8596
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 13 additions and 11 deletions

View file

@ -149,6 +149,9 @@ struct seat {
xkb_mod_index_t mod_ctrl;
xkb_mod_index_t mod_meta;
xkb_keycode_t key_arrow_up;
xkb_keycode_t key_arrow_down;
/* Enabled modifiers */
bool shift;
bool alt;