A key-repeat is about keycodes, not keysyms. We repeat the keycode and the
events that are generated by it, so we must also stop repeating if the
given keycode is released.
This fixes a bug where a key would still be repeated if we press:
<a-down> - <Shift-down> - <a-up> - <Shift-up>
Reported-by: Ran Benita <ran234@gmail.com>
Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
}
if (key_state == KEY_RELEASED &&
- dev->repeat_event.num_syms == num_keysyms &&
- !memcmp(dev->repeat_event.keysyms,
- keysyms,
- sizeof(uint32_t) * num_keysyms)) {
+ dev->repeat_event.keycode == code) {
ev_timer_update(dev->repeat_timer, NULL);
} else if (key_state == KEY_PRESSED &&
xkb_key_repeats(keymap, keycode)) {