[][src]Function winconsole::input::is_key_toggled

pub fn is_key_toggled(key_code: KeyCode) -> bool

Returns a boolean representing whether or not a key such as CapsLock or NumLock is toggled. This is insignificant for non-toggle keys.

Arguments

Examples

let pressed = input::is_key_toggled(KeyCode::Capital);
println!("Is CapsLock on? {}", pressed);