tests: Add AutomatedEvent::KeyUp
This commit is contained in:
parent
be5eaaec6e
commit
bc9aa18d6f
|
@ -230,6 +230,10 @@ impl TestRunner {
|
|||
key_code: KeyCode::from_u8(*key_code).expect("Invalid keycode in test"),
|
||||
key_char: None,
|
||||
},
|
||||
AutomatedEvent::KeyUp { key_code } => PlayerEvent::KeyUp {
|
||||
key_code: KeyCode::from_u8(*key_code).expect("Invalid keycode in test"),
|
||||
key_char: None,
|
||||
},
|
||||
AutomatedEvent::TextInput { codepoint } => PlayerEvent::TextInput {
|
||||
codepoint: *codepoint,
|
||||
},
|
||||
|
|
|
@ -65,6 +65,9 @@ pub enum AutomatedEvent {
|
|||
/// Press a key
|
||||
KeyDown { key_code: u8 },
|
||||
|
||||
/// Release a key
|
||||
KeyUp { key_code: u8 },
|
||||
|
||||
/// Input a character code
|
||||
TextInput { codepoint: char },
|
||||
|
||||
|
|
|
@ -96,6 +96,7 @@ impl InputInjector {
|
|||
AutomatedEvent::Wait => break,
|
||||
AutomatedEvent::MouseMove { .. }
|
||||
| AutomatedEvent::KeyDown { .. }
|
||||
| AutomatedEvent::KeyUp { .. }
|
||||
| AutomatedEvent::TextInput { .. }
|
||||
| AutomatedEvent::TextControl { .. }
|
||||
| AutomatedEvent::SetClipboardText { .. } => {}
|
||||
|
|
Loading…
Reference in New Issue