winconsole::input
pub fn is_key_down(key_code: KeyCode) -> bool
Returns a boolean representing whether or not the key is currently pressed.
key_code
let pressed = input::is_key_down(KeyCode::Return); println!("Is [ENTER] pressed? {}", pressed);