Prevent commands from firing on key-up
This commit is contained in:
parent
e767a3b82a
commit
7ab876255c
1 changed files with 4 additions and 4 deletions
|
@ -262,14 +262,14 @@ impl EventReader {
|
|||
}
|
||||
} else if let Some(command_hashmap) = path.combinations.keys_sh.get(&Key(event.code())) {
|
||||
if let Some(command_list) = command_hashmap.get(&modifiers) {
|
||||
self.spawn_subprocess(command_list).await;
|
||||
if event.value() == 1 {self.spawn_subprocess(command_list).await};
|
||||
return
|
||||
}
|
||||
}
|
||||
if let Some(event_list) = path.bindings.keys.get(&Key(event.code())) {
|
||||
self.emit_event(event_list, event.value()).await;
|
||||
} else if let Some(command_list) = path.bindings.keys_sh.get(&Key(event.code())) {
|
||||
self.spawn_subprocess(command_list).await;
|
||||
if event.value() == 1 {self.spawn_subprocess(command_list).await};
|
||||
} else {
|
||||
self.emit_default_event(event).await;
|
||||
}
|
||||
|
@ -288,7 +288,7 @@ impl EventReader {
|
|||
}
|
||||
} else if let Some(command_hashmap) = path.combinations.axis_sh.get(event_string) {
|
||||
if let Some(command_list) = command_hashmap.get(&modifiers) {
|
||||
self.spawn_subprocess(command_list).await;
|
||||
if event.value() == 1 {self.spawn_subprocess(command_list).await};
|
||||
return
|
||||
}
|
||||
}
|
||||
|
@ -298,7 +298,7 @@ impl EventReader {
|
|||
self.emit_event_without_modifiers(event_list, &modifiers, 0).await;
|
||||
}
|
||||
} else if let Some(command_list) = path.bindings.axis_sh.get(event_string) {
|
||||
self.spawn_subprocess(command_list).await;
|
||||
if event.value() == 1 {self.spawn_subprocess(command_list).await};
|
||||
} else {
|
||||
self.emit_default_event(event).await;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue