Skip to main content

key_pressed

Function key_pressed 

Source
pub fn key_pressed(key: &Key) -> bool
Expand description

Whether key went down during this frame. False for a key the OS is repeating, which is what makes it the one to drive a once-per-press action while key_held drives a continuous one.