Skip to main content

key_code

Function key_code 

Source
pub fn key_code(virtual_key: u16) -> KeyCode
Expand description

The key position for an NSEvent keyCode, or Unidentified carrying the raw code.

Nothing here can fail: an unknown code is still a key the user pressed, and a host that can distinguish two of them by their raw value is better off than one that received nothing.