Remove input from KeyDownEvent

This commit is contained in:
Antonio Scandurra 2022-07-21 14:29:27 +02:00
parent f170582c26
commit 101a0663d3
6 changed files with 16 additions and 79 deletions

View file

@ -141,13 +141,7 @@ impl<'a> EditorTestContext<'a> {
pub fn simulate_keystroke(&mut self, keystroke_text: &str) {
let keystroke = Keystroke::parse(keystroke_text).unwrap();
let input = if keystroke.modified() {
None
} else {
Some(keystroke.key.clone())
};
self.cx
.dispatch_keystroke(self.window_id, keystroke, input, false);
self.cx.dispatch_keystroke(self.window_id, keystroke, false);
}
pub fn simulate_keystrokes<const COUNT: usize>(&mut self, keystroke_texts: [&str; COUNT]) {