From d21f0698b505d699c44e9414f902dbeca9474e39 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Thu, 7 Sep 2023 02:46:19 +0200 Subject: Add hotkey support for `stopwatch` example --- futures/src/keyboard.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'futures') diff --git a/futures/src/keyboard.rs b/futures/src/keyboard.rs index 1ddca0bb..af68e1f2 100644 --- a/futures/src/keyboard.rs +++ b/futures/src/keyboard.rs @@ -44,9 +44,9 @@ where Message: MaybeSend + 'static, { #[derive(Hash)] - struct OnKeyPress; + struct OnKeyRelease; - subscription::filter_map((OnKeyPress, f), move |event, status| { + subscription::filter_map((OnKeyRelease, f), move |event, status| { match (event, status) { ( core::Event::Keyboard(Event::KeyReleased { -- cgit