winconsole::input
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.
key_code
let pressed = input::is_key_toggled(KeyCode::Capital); println!("Is CapsLock on? {}", pressed);