-
Notifications
You must be signed in to change notification settings - Fork 3
Uinput keyboard reference
d86leader edited this page Jul 23, 2022
·
3 revisions
With wzmach's UinputAction you send raw keyboard events. Raw keyboard events are not letters, they are key codes, but for convenience they have names. That means that if you have swapped the places of CapsLock and LeftControl for example, and you want to use control in an action, you need to use CapsLock instead, which is what you would have pressed physically.
The names of the keys are tied to some legace QWERTY layout similar to what the creator of vi had. It mostly corresponds to a stadard ANSI QWERTY layout, except in code ordering:
Esc F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 SysRq ScrollLock NumLock F13 F19 LineFeed
Grave 1 2 3 4 5 6 7 8 9 0 Minus Equal BackSpace Insert Home PageUp F14 F20 ScrollUp
Tab Q W E R T Y U I O P LeftBrace RightBrace BackSlash Delete End PageDown F15 F21 ScrollDown
CapsLock A S D F G H J K L SemiColon Apostrophe Enter F16 F22
LeftShift Z X C V B N M Comma Dot Slash RightShift Up F17 F23
LeftControl LeftMeta LeftAlt Space RightAlt RightMeta RightControl Left Down Right F18 F24
These are the keys I copied from the rust library, admittedly an unmaintained one. There are a couple of questions:
- Are PrintScreen and SysRq the same key?
- What are those keys on the right? I assume the F ones are from the new gaming keyboards (they also have the highest codes), and the rightmost three are from some old keyboard variant
- Where is the fn key? I though I saw it somewhere in the wall of keys, but I can't find it now. Is it the Keyboard::Function::Press that I deliberately didn't copy?
"Esc"
"1"
"2"
"3"
"4"
"5"
"6"
"7"
"8"
"9"
"0"
"Minus"
"Equal"
"BackSpace"
"Tab"
"Q"
"W"
"E"
"R"
"T"
"Y"
"U"
"I"
"O"
"P"
"LeftBrace"
"RightBrace"
"Enter"
"LeftControl"
"A"
"S"
"D"
"F"
"G"
"H"
"J"
"K"
"L"
"SemiColon"
"Apostrophe"
"Grave"
"LeftShift"
"BackSlash"
"Z"
"X"
"C"
"V"
"B"
"N"
"M"
"Comma"
"Dot"
"Slash"
"RightShift"
"LeftAlt"
"Space"
"CapsLock"
"F1"
"F2"
"F3"
"F4"
"F5"
"F6"
"F7"
"F8"
"F9"
"F10"
"NumLock"
"ScrollLock"
"F11"
"F12"
"RightControl"
"SysRq"
"RightAlt"
"LineFeed"
"Home"
"Up"
"PageUp"
"Left"
"Right"
"End"
"Down"
"PageDown"
"Insert"
"Delete"
"LeftMeta"
"RightMeta"
"ScrollUp"
"ScrollDown"
"F13"
"F14"
"F15"
"F16"
"F17"
"F18"
"F19"
"F20"
"F21"
"F22"
"F23"
"F24"
// Keypad
"Keypad_Asterisk"
"Keypad_7"
"Keypad_8"
"Keypad_9"
"Keypad_Minus"
"Keypad_4"
"Keypad_5"
"Keypad_6"
"Keypad_Plus"
"Keypad_1"
"Keypad_2"
"Keypad_3"
"Keypad_0"
"Keypad_Dot"
"Keypad_AltComma"
"Keypad_Enter"
"Keypad_Slash"
"Keypad_Equal"
"Keypad_PlusMinus"
"Keypad_Comma"
"Keypad_LeftParen"
"Keypad_RightParen"
// Miscellaneous
"ZenkakuHankaku"
"ND102"
"RO"
"Katakana"
"Hiragana"
"Henkan"
"KatakanaHiragana"
"Muhenkan"
"Macro"
"Mute"
"VolumeDown"
"VolumeUp"
"Power"
"Pause"
"Scale"
"Hangeul"
"Hanguel"
"Hanja"
"Yen"
"Compose"
"Stop"
"Again"
"Props"
"Undo"
"Front"
"Copy"
"Open"
"Paste"
"Find"
"Cut"
"Help"
"Menu"
"Calc"
"Setup"
"Sleep"
"WakeUp"
"File"
"SendFile"
"DeleteFile"
"XFer"
"Prog1"
"Prog2"
"WWW"
"MSDOS"
"Coffee"
"ScreenLock"
"RotateDisplay"
"Direction"
"CycleWindows"
"Mail"
"Bookmarks"
"Computer"
"Back"
"Forward"
"CloseCD"
"EjectCD"
"EjectCloseCD"
"NextSong"
"PlayPause"
"PreviousSong"
"StopCD"
"Record"
"Rewind"
"Phone"
"Iso"
"Config"
"HomePage"
"Refresh"
"Exit"
"Move"
"Edit"
"New"
"Redo"
"PlayCD"
"PauseCD"
"Prog3"
"Prog4"
"DashBoard"
"Suspend"
"Close"
"Play"
"FastForward"
"BassBoost"
"Print"
"HP"
"Camera"
"Sound"
"Question"
"Email"
"Chat"
"Search"
"Connect"
"Finance"
"Sport"
"Shop"
"AltErase"
"Cancel"
"BrightnessDown"
"BrightnessUp"
"Media"
"SwitchVideoMode"
"IllumToggle"
"IllumDown"
"IllumUp"
"Send"
"Reply"
"ForwardEmail"
"Save"
"Documents"
"Battery"
"Bluetooth"
"WLAN"
"UWB"
"Unknown"
"VideoNext"
"VideoPrev"
"BrightnessCycle"
"BrightnessAuto"
"BrightnessZero"
"DisplayOff"
"WWAN"
"WIMAX"
"RFKILL"
"MicMute"
"Ok"
"Select"
"Goto"
"Clear"
"Power2"
"Option"
"Info"
"Time"
"Vendor"
"Archive"
"Program"
"Channel"
"Favorites"
"EPG"
"PVR"
"MHP"
"Language"
"Title"
"Subtitle"
"Angle"
"Zoom"
"Mode"
"Keyboard"
"Screen"
"PC"
"TV"
"TV2"
"VCR"
"VCR2"
"SAT"
"SAT2"
"CD"
"Tape"
"Radio"
"Tuner"
"Player"
"Text"
"DVD"
"AUX"
"MP3"
"Audio"
"Video"
"Directory"
"List"
"Memo"
"Calendar"
"Red"
"Green"
"Yellow"
"Blue"
"ChannelUp"
"ChannelDown"
"First"
"Last"
"AB"
"Next"
"Restart"
"Slow"
"Shuffle"
"Break"
"Previous"
"Digits"
"TEEN"
"TWEN"
"VideoPhone"
"Games"
"ZoomIn"
"ZoomOut"
"ZoomReset"
"WordProcessor"
"Editor"
"SpreadSheet"
"GraphicsEditor"
"Presentation"
"Database"
"News"
"VoiceMail"
"AddressBook"
"Messenger"
"DisplayToggle"
"BrightnessToggle"
"SpellCheck"
"LogOff"
"Dollar"
"Euro"
"FrameBack"
"FrameForward"
"ContextMenu"
"MediaRepeat"
"Up10Channels"
"Down10Channels"
"Images"
"DeleteEOL"
"DeleteEOS"
"InsertLine"
"DeleteLine"
"WPS"
"LightsToggle"
"ALSToggle"
"ButtonConfig"
"TaskManager"
"Journal"
"ControlPanel"
"AppSelect"
"ScreenSaver"
"VoiceCommand"
"BrighnessMin"
"BrightnessMax"