uterm: input: fix stopping key-repeats on key-up
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>
This commit is contained in:
parent
cc02876d6c
commit
b9b05283bf
@ -214,10 +214,7 @@ int uxkb_dev_process(struct uterm_input_dev *dev,
|
||||
}
|
||||
|
||||
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)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user