Add hotkey support for stopwatch example
This commit is contained in:
parent
08a031cbe5
commit
d21f0698b5
2 changed files with 17 additions and 3 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue