On X11, avoid false positive key repeats
Instead of a single `bool` indicating that a key press has occured and no key has been released since then, we store the scancode of the last pressed key (if it is a key that repeats when held). This fixes a bug where pressing a new key while one is already held down will be flagged as a repeat even though it is obviously not a repeat.
This commit is contained in:
parent
bca57ed0b4
commit
bd890e69aa
4 changed files with 41 additions and 8 deletions
|
|
@ -289,10 +289,10 @@ impl<T: 'static> EventLoop<T> {
|
|||
xkbext,
|
||||
kb_state,
|
||||
num_touch: 0,
|
||||
held_key_press: None,
|
||||
first_touch: None,
|
||||
active_window: None,
|
||||
is_composing: false,
|
||||
got_key_release: true,
|
||||
};
|
||||
|
||||
// Register for device hotplug events
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue