mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-03-12 15:50:55 +03:00
fix pressed key tracking
accidentally broke this in 8f7890c
closes #174
This commit is contained in:
@@ -155,6 +155,7 @@ impl InputEmulation {
|
||||
|
||||
pub async fn create(&mut self, handle: EmulationHandle) -> bool {
|
||||
if self.handles.insert(handle) {
|
||||
self.pressed_keys.insert(handle, HashSet::new());
|
||||
self.emulation.create(handle).await;
|
||||
true
|
||||
} else {
|
||||
@@ -165,6 +166,7 @@ impl InputEmulation {
|
||||
pub async fn destroy(&mut self, handle: EmulationHandle) {
|
||||
let _ = self.release_keys(handle).await;
|
||||
if self.handles.remove(&handle) {
|
||||
self.pressed_keys.remove(&handle);
|
||||
self.emulation.destroy(handle).await
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user