Closed mkarup closed 4 years ago
when listening to events, you get https://docs.rs/quicksilver/0.4.0-alpha0.5/quicksilver/input/enum.Event.html whenever an event fires.
You get KeyboardInput(KeyboardEvent),,
every time the state of a button changed. KeyboardEvent
is https://docs.rs/quicksilver/0.4.0-alpha0.5/quicksilver/input/struct.KeyboardEvent.html
So, simply use its is_down
method to see if it is down or not and key() to see which key it is about
Is there an easy way to get the state of a keyboard input event, other than when it is pressed? Sorry if I'm just being blind, but I can't seem to find an easy way to check if a key has been released. Thanks in advance! ~Malynome