wl_keyboard: don't send key-up events for keys that are not logically down
This commit is contained in:
parent
abaeed4c01
commit
53c38bdd68
9 changed files with 68 additions and 27 deletions
|
|
@ -52,11 +52,14 @@ impl EiKeyboard {
|
|||
});
|
||||
}
|
||||
|
||||
pub fn send_key(&self, key: u32, state: u32) {
|
||||
pub fn send_key(&self, key: u32, state: KeyState) {
|
||||
self.client.event(ServerKey {
|
||||
self_id: self.id,
|
||||
key,
|
||||
state,
|
||||
state: match state {
|
||||
KeyState::Released => 0,
|
||||
KeyState::Pressed => 1,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue