List of keynames

From Official Kodi Wiki
Revision as of 00:22, 1 October 2011 by Ned Scott (talk | contribs)
Jump to navigation Jump to search

This is a list of all the key names that can be used in keyboard.xml.

Note that even keys that aren't in the list can be used in keyboard.xml with the syntax:

<key id="xxx">Action</key>

where xxx is the key code. You can get the key code by looking in xbmc.log. Enable debug logging then press the key a few times. Now look in xbmc.log for lines like:

DEBUG: SDLKeyboard: scancode: 2, sym: 49, unicode: 49, modifier: 0
DEBUG: CApplication::OnKey: 61537 pressed, action is Number1

The number after CApplication::OnKey, i.e. 61537 in this case, is the key code. This number is decimal not hex.

XBMC key name Key code
zero 0x30
one 0x31
two 0x32
three 0x33
four 0x34
five 0x35
six 0x36
seven 0x37
eight 0x38
nine 0x39
backspace VK_BACK
return VK_RETURN
enter VK_SEPARATOR
escape VK_ESCAPE
tab VK_TAB
space VK_SPACE
left VK_LEFT
right VK_RIGHT
up VK_UP
down VK_DOWN
insert VK_INSERT
delete VK_DELETE
home VK_HOME
end VK_END
f1 VK_F1
f2 VK_F2
f3 VK_F3
f4 VK_F4
f5 VK_F5
f6 VK_F6
f7 VK_F7
f8 VK_F8
f9 VK_F9
f10 VK_F10
f11 VK_F11
f12 VK_F12
numpadzero VK_NUMPAD0
numpadone VK_NUMPAD1
numpadtwo VK_NUMPAD2
numpadthree VK_NUMPAD3
numpadfour VK_NUMPAD4
numpadfive VK_NUMPAD5
numpadsix VK_NUMPAD6
numpadseven VK_NUMPAD7
numpadeight VK_NUMPAD8
numpadnine VK_NUMPAD9
numpadtimes VK_MULTIPLY
numpadplus VK_ADD
numpadminus VK_SUBTRACT
numpadperiod VK_DECIMAL
numpaddivide VK_DIVIDE
pageup VK_PRIOR
pagedown VK_NEXT
printscreen VK_PRINT
menu VK_APPS
pause VK_PAUSE
leftshift VK_LSHIFT
rightshift VK_RSHIFT
leftctrl VK_LCONTROL
rightctrl VK_RCONTROL
leftalt VK_LMENU
rightalt VK_RMENU
leftwindows VK_LWIN
rightwindows VK_RWIN
capslock VK_CAPITAL
numlock VK_NUMLOCK
scrolllock VK_SCROLL
equals VK_OEM_PLUS
comma VK_OEM_COMMA
minus VK_OEM_MINUS
period VK_OEM_PERIOD
semicolon VK_OEM_1
forwardslash VK_OEM_2
opensquarebracket VK_OEM_4
backslash VK_OEM_5
closesquarebracket VK_OEM_6
quote VK_OEM_7
leftquote VK_OEM_8
browser_refresh VK_BROWSER_REFRESH
browser_search VK_BROWSER_SEARCH
browser_favorites VK_BROWSER_FAVORITES
browser_home VK_BROWSER_HOME
volume_mute VK_VOLUME_MUTE
volume_down VK_VOLUME_DOWN
volume_up VK_VOLUME_UP
next_track VK_MEDIA_NEXT_TRACK
prev_track VK_MEDIA_PREV_TRACK
stop VK_MEDIA_STOP
play_pause VK_MEDIA_PLAY_PAUSE
launch_mail VK_LAUNCH_MAIL
launch_media_select VK_LAUNCH_MEDIA_SELECT
launch_app1_pc_icon VK_LAUNCH_APP1