diff --git a/sdl2/src/lib.rs b/sdl2/src/lib.rs index 7c65c8e..5546f8c 100644 --- a/sdl2/src/lib.rs +++ b/sdl2/src/lib.rs @@ -143,31 +143,10 @@ impl Context { Event::KeyDown { keycode: Some(keycode), keymod, - repeat, .. } => { if let Some(keyboard_input) = input::sdl2_to_chargrid(keycode, keymod) { - if repeat { - // repeated key inputs are just treated as key presses - Some(Input::Keyboard(keyboard_input)) - } else { - // handle this here because we need to send both a keydown and keypress - if let Some(app::Exit) = on_input( - &mut component, - Input::Keyboard(keyboard_input), - &chargrid_frame_buffer, - ) { - break 'mainloop; - } - if let Some(app::Exit) = on_input( - &mut component, - Input::Keyboard(keyboard_input), - &chargrid_frame_buffer, - ) { - break 'mainloop; - } - None - } + Some(Input::Keyboard(keyboard_input)) } else { None }