jixiuf 8 months ago committed by GitHub
parent 9899383a90
commit af4c910773
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -528,6 +528,7 @@ impl EventHandler {
// Resurrect the original modifiers
self.send_keys(&extra_modifiers, PRESS);
self.send_action(Action::Delay(self.keypress_delay));
self.send_keys(&missing_modifiers, RELEASE);
}

@ -262,6 +262,7 @@ fn test_interleave_modifiers() {
Action::KeyEvent(KeyEvent::new(Key::KEY_RIGHT, KeyValue::Release)),
Action::Delay(Duration::from_nanos(0)),
Action::KeyEvent(KeyEvent::new(Key::KEY_LEFTALT, KeyValue::Press)),
Action::Delay(Duration::from_nanos(0)),
Action::KeyEvent(KeyEvent::new(Key::KEY_LEFTCTRL, KeyValue::Release)),
],
)
@ -312,6 +313,7 @@ fn test_exact_match_false() {
Action::KeyEvent(KeyEvent::new(Key::KEY_RIGHT, KeyValue::Release)),
Action::Delay(Duration::from_nanos(0)),
Action::KeyEvent(KeyEvent::new(Key::KEY_LEFTALT, KeyValue::Press)),
Action::Delay(Duration::from_nanos(0)),
Action::KeyEvent(KeyEvent::new(Key::KEY_LEFTCTRL, KeyValue::Release)),
],
)
@ -339,6 +341,7 @@ fn test_exact_match_default() {
Action::KeyEvent(KeyEvent::new(Key::KEY_RIGHT, KeyValue::Release)),
Action::Delay(Duration::from_nanos(0)),
Action::KeyEvent(KeyEvent::new(Key::KEY_LEFTALT, KeyValue::Press)),
Action::Delay(Duration::from_nanos(0)),
Action::KeyEvent(KeyEvent::new(Key::KEY_LEFTCTRL, KeyValue::Release)),
],
)
@ -401,6 +404,7 @@ fn test_exact_match_false_nested() {
Action::KeyEvent(KeyEvent::new(Key::KEY_A, KeyValue::Press)),
Action::KeyEvent(KeyEvent::new(Key::KEY_A, KeyValue::Release)),
Action::Delay(Duration::from_nanos(0)),
Action::Delay(Duration::from_nanos(0)),
Action::KeyEvent(KeyEvent::new(Key::KEY_LEFTCTRL, KeyValue::Release)),
],
)
@ -430,6 +434,7 @@ fn test_application_override() {
Action::KeyEvent(KeyEvent::new(Key::KEY_B, KeyValue::Press)),
Action::KeyEvent(KeyEvent::new(Key::KEY_B, KeyValue::Release)),
Action::Delay(Duration::from_nanos(0)),
Action::Delay(Duration::from_nanos(0)),
Action::KeyEvent(KeyEvent::new(Key::KEY_LEFTCTRL, KeyValue::Release)),
],
);
@ -443,6 +448,7 @@ fn test_application_override() {
Action::KeyEvent(KeyEvent::new(Key::KEY_C, KeyValue::Press)),
Action::KeyEvent(KeyEvent::new(Key::KEY_C, KeyValue::Release)),
Action::Delay(Duration::from_nanos(0)),
Action::Delay(Duration::from_nanos(0)),
Action::KeyEvent(KeyEvent::new(Key::KEY_LEFTCTRL, KeyValue::Release)),
],
);
@ -479,6 +485,7 @@ fn test_merge_remaps() {
Action::KeyEvent(KeyEvent::new(Key::KEY_A, KeyValue::Press)),
Action::KeyEvent(KeyEvent::new(Key::KEY_A, KeyValue::Release)),
Action::Delay(Duration::from_nanos(0)),
Action::Delay(Duration::from_nanos(0)),
Action::KeyEvent(KeyEvent::new(Key::KEY_LEFTCTRL, KeyValue::Release)),
],
);
@ -500,6 +507,7 @@ fn test_merge_remaps() {
Action::KeyEvent(KeyEvent::new(Key::KEY_W, KeyValue::Press)),
Action::KeyEvent(KeyEvent::new(Key::KEY_W, KeyValue::Release)),
Action::Delay(Duration::from_nanos(0)),
Action::Delay(Duration::from_nanos(0)),
Action::KeyEvent(KeyEvent::new(Key::KEY_LEFTCTRL, KeyValue::Release)),
],
)
@ -537,6 +545,7 @@ fn test_merge_remaps_with_override() {
Action::KeyEvent(KeyEvent::new(Key::KEY_A, KeyValue::Press)),
Action::KeyEvent(KeyEvent::new(Key::KEY_A, KeyValue::Release)),
Action::Delay(Duration::from_nanos(0)),
Action::Delay(Duration::from_nanos(0)),
Action::KeyEvent(KeyEvent::new(Key::KEY_LEFTCTRL, KeyValue::Release)),
],
);
@ -558,6 +567,7 @@ fn test_merge_remaps_with_override() {
Action::KeyEvent(KeyEvent::new(Key::KEY_Q, KeyValue::Press)),
Action::KeyEvent(KeyEvent::new(Key::KEY_Q, KeyValue::Release)),
Action::Delay(Duration::from_nanos(0)),
Action::Delay(Duration::from_nanos(0)),
Action::KeyEvent(KeyEvent::new(Key::KEY_LEFTCTRL, KeyValue::Release)),
],
)

Loading…
Cancel
Save