Check if the Up key is currently pressed:
Up
use readkey::Keycode; fn main() { loop { println!("State of Up key: {}, ", Keycode::Up.is_pressed()); } }