From Official Kodi Wiki
Jump to: navigation, search
Home icon grey.png   ▶ Remote controls ▶ Keymap

Keymaps are XML base files that define the mappings of keys (keyboard keys, mouse/remote/joysticks buttons and more) to Kodi actions.


1 Customizing keymaps through the GUI

Users can customize keymaps for remotes in GUI by using the community Keymap Editor add-on.

2 Location of keymaps

User modified keymap files must be stored in the "keymaps" folder in the userdata folder:

Note: In older versions of the software (before v14) the kodi directories were named xbmc.

Operative system File path
Android Android/data/org.xbmc.kodi/files/.kodi/userdata/ (see note)
iOS /private/var/mobile/Library/Preferences/Kodi/userdata/
Linux ~/.kodi/userdata/
Mac /Users/<your_user_name>/Library/Application Support/Kodi/userdata/ (see note)
LibreELEC/OpenELEC /storage/.kodi/userdata/
Windows Start - type %APPDATA%\kodi\userdata - press <Enter>

2.1 Android location

Sometimes the exact path will differ from device to device. The Android userdata folder is usually inside of "sdcard" so the path might be /sdcard/Android/data/org.xbmc.kodi/files/.kodi/userdata/

2.2 Windows 10 App Store version

Kodi Krypton installed from the Win 10 App Store puts user data in [c:]\Users\[user]\AppData\Local\Packages\XBMCFoundation.Kodi_4n2hpmxwrvr6p\LocalCache\Roaming\Kodi\userdata\

2.3 Defaults

Default keymaps are included when Kodi is installed, but users should not edit those install files directly. Instead, place user modified keymaps in the userdata/keymaps/ directory.

Kodi can process multiple keymap files and does so like this:

  • All *.xml files from the default install settings and userdata/kemaps/ folders are applied as keymaps.
  • All *.xml files are processed in alphabetical order.
  • Keymaps defined in an .xml file add to or override mappings in previous .xml file.
  • Keymaps defined in the userdata folder add to or override mappings in the global keymap.

By default there will be no files in these locations, so grab one from the link below to make a new one/over-ride:

3 Structure

There is one global keymap and several window-specific keymaps.
Kodi falls back to the global map when the window-specific map hasn't bound the key being pressed.

The format of keymapping files is as follows:





    <joystick name="PLAYSTATION(R)3 Controller (00:1B:FB:F6:E0:F2)">
      <button id="15">Select</button>




As you can see, it's divided into a <global> section, and a number of window sections (such as <Home>).
A list of the available window names can be seen here. The WINDOW can also be a custom window formatted as <windowId#> (e. g. <window1113>).
Each of these sections can contain Gamepad, Remote, Keyboard, Universal Remote, and custom Joystick sections.

The format for mapping a particular key under one of these device types is as follows:


4 Keynames

Depending on your device you will need to use a specific "keyname".

4.1 Gamepads

An up to date list of the available actions can be found in the source code of Kodi in ButtonTranslator.cpp where the TranslateGamepadString() function does the work.



4.2 Remotes

An up to date list of the available actions can be found in the source code of Kodi in ButtonTranslator.cpp where the TranslateRemoteString() function does the work.

Note: Some remotes are actually seen as "keyboards". Those will need to use the <keyboard> tag instead.



4.3 Universal Remotes

To map Universal Remote buttons using the RCA infrared protocol, you may add <universalremote> sections to keymap.xml.
In this case, the tags used are <obc#> where # is the original button code (OBC) of the button.
You would put it inside a <universalremote> section in the <window> or <global> sections.


Will map Stop Playback to the RCA DVD repeat button <obc148>, which is not used by Kodi by default.
  • Note: ensure that the <universalremote> section is NOT added 'within' the <remote> section - it can appear before or after. Otherwise it will not be recognised and produces errors in the logfile.

Remote keys can be observed in the kodi.log file (~/.kodi/temp/kodi.log on Linux) when debugging is enabled in the GUI (Settings -> debugging ). The list of pre-defined OBC codes can be found at XBIRRemote.h.

4.4 Keyboards

Valid keyboard keymap syntax includes <keyname>, <key id="">, and <keyname mod="">.

Mapping for arbitrary key codes can be configured using the following syntax:

<key id="123">

where "123" is replaced by the key code.

A full list of valid keynames can be found in


  <key id="123">action</key> -- id is the keys keycode. >
  <a mod="shift,alt">action</a> -- corresponds to shift-alt-a, the mod="" syntax is enabled since build 26407. >
  <space>action</space> -- for a complete list of valid keynames, see ButtonTranslator.cpp or List of Kodi keynames above. >
  • shift
  • alt
  • ctrl

4.5 Custom Joystick Configuration

Custom joysticks are defined using the following syntax:

<joystick name="JOYSTICK NAME">
  <button id="BUTTON ID">action</button>

Getting the joystick name:

  • On linux: 'cat /proc/bus/input/devices'
  • or see your Kodi log file

Getting the button ids:

  • 'id' is the button ID used by SDL. Joystick button ids of connected joysticks appear in kodi.log when they are pressed. Use your log to map custom buttons to actions.


<joystick name="PLAYSTATION(R)3 Controller (00:1B:FB:F6:E0:F2)">
  <button id="15">Select</button>
  <button id="14">PreviousMenu</button>

5 Long-press

Note: Longpress seems to only be working on keyboard keymaps at the moment Depending on the device, many remotes, keyboards, and gamepads can use the long-press modifier. This allows a button to do a separate action when held for a short period of time. The syntax for this is as follows:

<button mod="longpress">action</button>

Not all devices will correctly work with the longpress action, but most should.

Note: Long-press will disable keyrepeat for that key/window.

5.1 Removing a long-press action from a default keymap

If you want to simply remove a long-press action, rather than override it, you can place an empty long-press tag in a keymap. This also has the effect of re-enabling keyrepeat for the short-press action.

For example, this will remove the context menu action from the default keyboard.xml keymap:

      <return mod="longpress"></return>
      <enter mod="longpress"></enter>

6 Commands

The most recent available actions can be found in the TranslateActionString() method in in ButtonTranslator.cpp.

For those debugging integer action codes from the debug log, the mapping of action codes to constants is in Key.h

In addition to the following actions, you can also use Built-in scripting in Kodi.

6.1 Actions

Main actions
Action Description
Left Move left off a control.
Right Move right off a control.
Up Move up off a control.
Down Move down off a control.
Select Select a button, or an item from a list of thumb view.
Enter ? (ACTION_ENTER) Not sure about all areas, but on some windows this will be the same as the "done" on screen button.
PageUp Scroll up on page in a list, thumb, or text view.
PageDown Scroll down on page in a list, thumb, or text view.
Highlight Highlight an item in a list or thumb view.
ParentDir Go up a folder to the parent folder.
PreviousMenu Go back to the previous menu screen.
Back Go back in navigation.
Info Show the information about the currently highlighted item, or currently playing item.
Pause Pause the currently playing item.
Stop Stop the currently playing item.
SkipNext Skip to next video in playlist. If no playlist, then skip to next chapter in video.
SkipPrevious Skip to previous video in playlist. If no playlist, then skip to previous chapter in video.
FullScreen Toggles full-screen content playback (either visualisation or video playback)
togglefullscreen Changes whether the app is displayed full-screen or windowed (on windowing OSs)
AspectRatio Toggle through the various aspect ratio modes (Normal is the preferred option).
StepForward Step forward 30 seconds in a video.
StepBack Step back 30 seconds in a video.
BigStepForward Step forward 10 minutes in video.
BigStepBack Step back 10 minutes in video.
SmallStepBack Step back 7 seconds in the current video.
Seek(##) A definable seek action, where ## is a number of seconds. For example, to make a seek action that goes forward 25 seconds use Seek(25), and to make a seek action that goes back 36 seconds use Seek(-36). (v15 Isengard addition)
ChapterOrBigStepForward Go to to next chapter in video. If no chapters, then step forward 10 minutes in video. (v13 Gotham addition)
ChapterOrBigStepBack Go to previous chapter in video, If no chapters, then step back 10 minutes in video. (v13 Gotham addition)
NextScene Go to next scene that is marked in an EDL file.
PreviousScene Go to previous scene that is marked in an EDL file.
OSD Toggles the OSD while playing an item.
PlayDVD Start playing a DVD (goes to the DVD menu)
ShowVideoMenu Go to the DVD Video menu when playing a DVD.
ShowSubtitles Toggles whether subtitles are shown or not.
NextSubtitle Change to the next subtitle language, if there is more than one.
CodecInfo Show codec information about the currently playing item (during video or visualisation playback)
NextPicture Move to the next picture in a slideshow.
PreviousPicture Move to the previous picture in a slideshow.
ZoomOut Used in picture, slideshow or video fullscreen to zoom out of the current image/video.
ZoomIn Used in picture, slideshow or video fullscreen to zoom in to the current image/video.
IncreasePAR Used in video fullscreen to increase the pixel aspect ratio (stretch).
DecreasePAR Used in video fullscreen to decrease the pixel aspect ratio (stretch).
Queue Queue the item to the current playlist
Filter Opens the mediafilter dialog in the video and musiclibrary. Editor note: seems to only use the advanced filter for the video library?
Playlist Toggle to playlist view from My Music or My Videos
ZoomNormal Normal (fullscreen) viewing in My Pictures
ZoomLevel1 Zoom to 120% in My Pictures
ZoomLevel2 Zoom to 150% in My Pictures
ZoomLevel3 Zoom to 200% in My Pictures
ZoomLevel4 Zoom to 280% in My Pictures
ZoomLevel5 Zoom to 400% in My Pictures
ZoomLevel6 Zoom to 600% in My Pictures
ZoomLevel7 Zoom to 900% in My Pictures
ZoomLevel8 Zoom to 1350% in My Pictures
ZoomLevel9 Zoom to 2000% in My Pictures
NextCalibration Used in Video + GUI calibration
ResetCalibration Used in Video + GUI calibration
AnalogMove Move in the calibration screens, and while zoomed in My Pictures.
Rotate Rotate a picture in My Pictures
Close Used to close a dialog
subtitledelay ? (ACTION_SUBTITLE_DELAY)
SubtitleDelayMinus Decrease the delay amount of subtitles (use if subtitles are displaying too late)
SubtitleDelayPlus Increase the delay amount of subtitles (use if subtitles are displaying too early)
audiodelay ? (ACTION_AUDIO_DELAY)
AudioDelayMinus Decrease the delay amount of audio (use if audio is being heard too early)
AudioDelayPlus Increase the delay amount of audio (use if audio is being heard too late)
AudioNextLanguage Change to the next audio track in a video with multiple audio tracks.
NextResolution Used in Video calibration
Number<0-9> Used to input the number 0 through 9
FastForward Toggle the fastforward speed between normal play, 2x, 4x, 8x, 16x, and 32x.
Rewind Toggle the rewind speed between normal play, 2x, 4x, 8x, 16x, and 32x.
Play Play the selected item (or folder of items). Note: You may want to use playpause instead of just "play", since it will no longer pause media already being played.
PlayPause Play the selected item (or folder of items). Will also pause media when something is already playing.
Delete Used in My Files to delete a file.
Copy Used in My Files to copy a file.
Move Used in My Files to move a file.
Rename Used in My Files to rename a file.
HideSubmenu <depreciated>
Screenshot Take a screenshot of the current screen.
ShutDown() Shutdown and power off
VolumeUp Increase the volume of playback.
VolumeDown Decrease the volume of playback.
Mute Mute the volume.
volampup ? (ACTION_VOLAMP_UP)
volampdown ? (ACTION_VOLAMP_DOWN)
audiotoggledigital ? (ACTION_TOGGLE_DIGITAL_ANALOG)
BackSpace Used in the virtual keyboards to delete one letter.
ScrollUp Variable speed scroll up for analog keys (stick or triggers)
ScrollDown Variable speed scroll down for analog keys (stick or triggers)
AnalogFastForward Variable speed fast forward for analog keys (stick or triggers)
AnalogRewind Variable speed rewind for analog keys (stick or triggers)
AnalogSeekForward Variable speed seeking for analog keys (stick or triggers)
AnalogSeekBack Variable speed seeking for analog keys (stick or triggers)
MoveItemUp Used to rearrange playlists
MoveItemDown Used to rearrange playlists
Menu Focus the menu control (e.g. sidebar in confluence) which is specified by the skin in different windows (e.g. Movies, Music, PVR etc.) (v16 Jarvis addition)
ContextMenu Pops up a contextual menu
Shift Used in Virtual Keyboard to switch to upper or lower case letters
Symbols Used in Virtual Keyboard to switch to or from symbols mode
CursorLeft Used in Virtual Keyboard to move the current cursor point to the left
CursorRight Used in Virtual Keyboard to move the current cursor point to the right
ShowTime Used to show the current play time in music + video playback
visualisationpresetlist Shows the visualisation preset list
ShowPreset Shows the current visualisation preset (milkdrop/spectrum)
NextPreset Next visualisation preset
PreviousPreset Previous visualisation preset
LockPreset Lock the current visualisation preset
RandomPreset Switch to a new random preset
IncreaseRating Used to increase track rating in full screen playback (press info on track and use pageplus on keyboard/remote
DecreaseRating Used to decrease track rating in full screen playback (press info on track and use pageminus on keyboard/remote
ToggleWatched Toggles watched/unwatched status for Videos
NextLetter Move to the next letter in a list or thumb panel. Note that SHIFT-B on the keyboard will take you to the B's.
PrevLetter Move to the previous letter in a list or thumb panel. Note that SHIFT-Z on the keyboard will take you to the Z's.
JumpSMS<2-9> Jump through a list using SMS-style input (eg press 2 twice to jump to the B's.)
FilterSMS<2-9> Filter a list in music or videos using SMS-style input.
verticalshiftup ? (ACTION_VSHIFT_UP)
verticalshiftdown ? (ACTION_VSHIFT_DOWN)
scanitem ? (ACTION_SCAN_ITEM)
reloadkeymaps Reload keymap, loading any changes made to the keymap since started up.
increasevisrating ? (ACTION_VIS_RATE_PRESET_PLUS)
decreasevisrating ? (ACTION_VIS_RATE_PRESET_MINUS)
firstpage ? (ACTION_FIRST_PAGE)
lastpage ? (ACTION_LAST_PAGE)
CreateBookmark Creates a bookmark of the currently playing Video (v13 Gotham addition)
CreatEpisodeBookmark Creates an episode bookmark of the currently playing multi-episode file (e.g. S01E01E02). An episode bookmark specifies the end of the one and the begin of the other episode (v13 Gotham addition)
NextChannelGroup PVR Goes to the next channel group when using live TV. Works only within PVR windows + channel osd. (v13 Gotham addition)
PreviousChannelGroup PVR Goes to the previous channel group when using live TV. Works only within PVR windows + channel osd. (v13 Gotham addition)
ChannelUp PVR Used to switch up to the next channel. Works only if you playback TV or radio (v13 Gotham addition)
ChannelDown PVR Used to switch down to the previous channel. Works only if you playback TV or radio(v13 Gotham addition)
PlayPvr PVR Starts playback a TV or radio channel depends on the last played channel. (v13 Gotham addition)
PlayPvrTV PVR Starts playback a TV channel. Will playback the last played channel if available. (v13 Gotham addition)
PlayPvrRadio PVR Starts playback a radio channel. Will playback the last played channel if available. (v13 Gotham addition)
Record PVR record current playing channel or selected item in windows like EPG (v13 Gotham addition)
StereoMode Toggle 3D/Stereoscopic mode (v13 Gotham addition)
ToggleStereoMode Toggle 3D/Stereoscopic mode (v13 Gotham addition)
SwitchPlayer Select player to use, such as internal (DVDPlayer/PAPlayer), UPnP "play using" targets, external players (defined in playercorefactory.xml). (v13 Gotham addition)
UpdateLibrary(video) Update Movie/TV-Show library (only tested with v13 Gotham addition).
SetRatring For use in the MusicOSD.xml window. Will pop-up a 1-10 userrating select dialog, to rate the currently playing song. (v17 Krypton addition)
Action Description
noop No action. Used to specifically disable a key.

6.2 Functions

Function Description Version
Action(action[,window]) Executes an action (same as in keymap) for the given window or the active window if the parameter window is omitted. The parameter window can either be the window's id, or in the case of a standard window, the window's name. See Action IDs for a list of window names, and their respective ids.
ActivateScreensaver Starts the screensaver v13 Addition
ActivateWindow(window[,dir,return]) Opens the given window. The parameter window can either be the window's id, or in the case of a standard window, the window's name. See Window IDs for a list of window names, and their respective ids. If, furthermore, the window is Music, Video, Pictures, or Program files, then the optional dir parameter specifies which folder Kodi should default to once the window is opened. This must be a source as specified in sources.xml, or a subfolder of a valid source. For some windows (MusicLibrary and VideoLibrary), the return parameter may be specified, which indicates that Kodi should use this folder as the "root" of the level, and thus the "parent directory" action from within this folder will return the user to where they were prior to the window activating.
ActivateWindowAndFocus(id1, id2,item1, id3,item2) Activate window with id1, first focus control id2 and then focus control id3. if either of the controls is a container, you can specify which item to focus (else, set it to 0). v12 Addition
Addon.Default.OpenSettings(extensionpoint) Open a settings dialog for the default addon of the given type (extensionpoint)
Addon.Default.Set(extensionpoint) Open a select dialog to allow choosing the default addon of the given type (extensionpoint)
Addon.OpenSettings(id) Open a settings dialog for the addon of the given id
AlarmClock(name,command,time[,silent,loop]) Pops up a dialog asking for the length of time (mm:ss) for the alarm (unless the parameter time is specified), and starts a timer. When the timer runs out, it'll execute the built-in command (the parameter command) if it is specified, otherwise it'll pop up an alarm notice. Add silent to hide the alarm notification. Add loop for the alarm to execute the command each time the specified time interval expires.
AllowIdleShutdown Allow the system to shutdown on idle. v12 Addition
CancelAlarm(name[,silent]) Cancel a running alarm. Set silent to true to hide the alarm notification.
CECActivateSource Wake up playing device via a CEC peripheral v13 Addition
CECStandby Put playing device on standby via a CEC peripheral v13 Addition
CECToggleState Toggle state of playing device via a CEC peripheral v13 Addition
CleanLibrary(database) This funtion will perform a number of 'cleanup' tasks on your video database and can be run if you have moved, deleted or renamed files. Takes either "video" or "music" as a parameter to begin cleaning the corresponding database.
ClearProperty(key[,id]) Clears a window property for the current focused window/dialog(key), or the specified window (key,id).
Container.NextSortMethod Change to the next sort method.
Container.NextViewMode Select the next view mode.
Container.PreviousSortMethod Change to the previous sort method.
Container.PreviousViewMode Select the previous view mode.
Container.Refresh Refresh current listing.
Container.SetSortMethod(id) Change to the specified sort method. (For list of ID's see List of sort methods below)
Container.SetViewMode(id) Set the current view mode (list, icons etc.) to the given container id.
Container.SetSortDirection Toggle the sort direction.
Container.Update Update current listing. Send Container.Update(path,replace) to reset the path history.
Control.Message(id,message,[windowid]) Sends a given message to a control in a given window (or active window if omitted). Messages can be movedown, moveup, pagedown, pageup, click.
Control.Move(id,offset) Will make a Container with the "id" specified in the command move focus by "offset".
Control.SetFocus(id,position) Will make a list with the "id" specified in the command gain focus at "position" number in its list. Alias SetFocus(id,position)
Dialog.Close(dialog[,force]) Close a dialog. Set force to true to bypass animations. Use (all,true) to close all opened dialogs at once.
EjectTray() Either opens or closes the DVD tray, depending on its current state
exportlibrary(music,false,filepath) The music library will be exported to a single file stored at filepath location.
exportlibrary(video,true,thumbs,overwrite,actorthumbs) The video library is exported to multiple files with the given options. Here thumbs, overwrite and actorthumbs are boolean values (true or false).
Extract(archive_url[, destination]) Extracts a specified archive to an optionally specified 'absolute' path.
Help This help message (??? probably broken)
Hibernate Hibernate (S4) the System
InhibitIdleShutdown(true/false) Prevent the system to shutdown on idle. v12 Addition
InstallAddon(id) Will install the addon with the given id.
LIRC.Send(command) Sends a command to LIRC, syntax is the lirc protocol without the newline. Example: LIRC.Send(SEND_ONCE Onkyo_RC-453S2 volup)
LIRC.Start Adds Kodi as a LIRC client.
LIRC.Stop Removes Kodi as a LIRC client.
LoadProfile(profilename,[prompt]) Load the specified profile. If prompt is not specified, and a password would be required for the requested profile, this command will silently fail. If promp' is specified and a password is required, a password dialog will be shown.
Mastermode Runs Kodi in master mode
Minimize Minimizes Kodi
Mute Mutes (or unmutes) the volume.
NextChannelGroup Navigate to the next PVR channel group (in DialogPVRChannelsOSD.xml) v13 Addition
NextStereoMode Changes the stereo mode of the GUI to the next available mode. v13 Addition
Notification(header,message[,time,image]) Will display a notification dialog with the specified header and message, in addition you can set the length of time it displays in milliseconds and a icon image.
NotifyAll(sender, data [, json]) Notify all connected clients v13 Addition
PageDown Send a page down event to the pagecontrol with given id.
PageUp Send a page up event to the pagecontrol with given id.
PlayDVD Will play the inserted CD or DVD media from the DVD-ROM drive.
PlayerControl(command) Allows control of music and videos. The command may be one of Play, Stop, Forward, Rewind, Next, Previous, BigSkipForward, BigSkipBackward, SmallSkipForward, SmallSkipBackward, TempoUp, TempoDown, Random, RandomOn, RandomOff, Repeat, RepeatOne, RepeatAll, RepeatOff, Partymode(music) or Partymode(video) or Partymode(path to .xsp file), and Record. Play will either pause, resume, or stop ffwding or rewinding. Random toggles random playback and Repeat cycles through the repeat modes (these both take an optional second parameter, Notify, that notifies the user of the new state). Partymode(music/video) toggles the appropriate partymode, defaults to music if no parameter is given, besides the default music or video partymode you can also pass a path to a custom smartplaylist (.xsp) as parameter.
Playlist.Clear Clear the current playlist
Playlist.PlayOffset Start playing from a particular offset in the playlist
PlayMedia(media[,isdir][,1],[playoffset=xx]) Plays the media. This can be a playlist, music, or video file, directory, plugin or a url. The optional parameter ",isdir" can be used for playing a directory. ",1" will start a video in a preview window, instead of fullscreen. If media is a playlist, you can use playoffset=xx where xx is the position to start playback from.
PlayWith() Play the selected item with the specified player core.
Powerdown Powerdown system
PreviousChannelGroup Navigate to the previous PVR channel group (in DialogPVRChannelsOSD.xml) v13 Addition
PreviousStereoMode Changes the stereo mode of the GUI to the previous available mode. v13 Addition
PVR.SearchMissingChannelIcons Will start a search for missing channel icons v16 Addition
Quit Quits Kodi
Reboot Cold reboots the system (power cycle)
RecursiveSlideShow(dir) Run a slideshow from the specified directory, including all subdirs
RefreshRSS Reload RSS feeds from RSSFeeds.xml
ReloadSkin() Reloads the current skin – useful for Skinners to use after they upload modified skin files (saves power cycling)
ReplaceWindow(window,dir) Replaces the current window with the given window. This is the same as ActivateWindow() but it doesn't update the window history list, so when you go back from the new window it will not return to the previous window, rather will return to the previous window's previous window.
ReplaceWindowAndFocus(id1, id2,item1, id3,item2) Replace window with id1, first focus control id2 and then focus control id3. if either of the controls is a container, you can specify which item to focus (else, set it to 0). v13 Addition
Reset Reset the system (same as reboot)
Resolution Change Kodi's Resolution.
RestartApp Restarts Kodi (only implemented under Windows and Linux)
RipCD Will rip the inserted CD from the DVD-ROM drive.
RunAddon(id) Runs the specified plugin/script
RunAppleScript(script[,args]*) Run the specified AppleScript command
RunPlugin(plugin) Runs the plugin. Full path must be specified. Does not work for folder plugins
RunScript(script[,args]*) Runs the python script. You must specify the full path to the script. One way to specify the full path is through the special protocol. If the script is an add-on, you can also execute it using its add-on id. As of 2007/02/24, all extra parameters are passed to the script as arguments and can be accessed by python using sys.argv
Seek(seconds) Seeks to the specified relative amount of seconds within the current playing media. A negative value will seek backward and a positive value forward. v15 Addition
SendClick(windowid,id) Sends a click to a control in a given window (or active window if omitted).
SetFocus(id,position) Will make a container with the "id" specified in the command gain focus at "position" number in its list. Alias SetFocus(id,position)
SetGUILanguage Set GUI Language v13 Addition
SetProperty(key,value[,id]) Sets a window property for the current window (key,value), or the specified window (key,value,id).
SetStereoMode Changes the stereo mode of the GUI. Params can be: toggle, next, previous, select, tomono or any of the supported stereomodes (off, split_vertical, split_horizontal, row_interleaved, hardware_based, anaglyph_cyan_red, anaglyph_green_magenta, monoscopic) v13 Addition
settingslevelchange Toggles the visible settings (in SettingsCategory.xml) between 'basic', 'standard', 'advanced and 'expert' v13 Addition
SetVolume(percent[,showvolumebar]) Sets the volume to the percentage specified. Optionally, show the Volume Dialog in Kodi when setting the volume.
ShowPicture(picture) Show a picture by its file path/url. v13 Addition
ShutDown Trigger default Shutdown action defined in System Settings
Skin.Reset(setting) Resets the skin setting ?setting?. If ?setting? is a bool setting (i.e. set via SetBool or ToggleSetting) then the setting is reset to false. If ?setting? is a string (Set via SetString, SetImage, or SetPath) then it is set to empty.
Skin.ResetSettings Resets all the above skin settings to their defaults (toggles all set to false, strings all set to empty.)
Skin.SelectBool(header, label1|setting1, label2|setting2) Pops up select dialog to select between multiple skin setting options. Skin.SelectBool(424, 31411|RecentWidget, 31412|RandomWidget, 31413|InProgressWidget)
Skin.SetAddon(string,type) Pops up a select dialog and allows the user to select an add-on of the given type to be used elsewhere in the skin via the info tag Skin.String(string). The most common types are,, xbmc.addon.image and xbmc.addon.executable.
Skin.SetBool(setting) Sets the skin setting ?setting? to true, for use with the conditional visibility tags containing Skin.HasSetting(setting). The settings are saved per-skin in settings.xml just like all the other Kodi settings.
Skin.SetFile(string,mask,folderpath) Pops up a folder browser and allows the user to select a file off the hard-disk to be used else where in the skin via the info tag Skin.String(string). If the mask parameter is specified, then the file browser will only search for the extension specified (.avi,.mp3,.m3u,.png,.bmp,etc.,etc.). To use multiple extensions separate them using "|" (minus quotes). If the folderpath parameter is set the file browser will start in that folder.
Skin.SetImage(string[,value,path]) Pops up a file browser and allows the user to select an image file to be used in an image control elsewhere in the skin via the info tag Skin.String(string). If the value parameter is specified, then the file browser dialog does not pop up, and the image path is set directly. the path option allows you to open the file browser in the specified folder.
Skin.SetNumeric(numeric[,value]) Pops up a keyboard dialog and allows the user to input a numerical.
Skin.SetPath(string[,folderpath]) Pops up a folder browser and allows the user to select a folder of images to be used in a multi image control else where in the skin via the info tag Skin.String(string). If the folderpath parameter is set the file browser will start in that folder.
Skin.SetString(string[,value]) Pops up a keyboard dialog and allows the user to input a string which can be used in a label control elsewhere in the skin via the info tag Skin.String(string). If the value parameter is specified, then the keyboard dialog does not pop up, and the string is set directly.
Skin.Theme(1) Cycles the skin theme. Skin.Theme(-1) will go backwards.
Skin.ToggleDebug Toggles skin debug info on/off
Skin.ToggleSetting(setting) Toggles the skin setting ?setting? for use with conditional visibility tags containing Skin.HasSetting(setting).
SlideShow(dir [,recursive, [not]random]) Starts a slideshow of pictures in the folder dir. Optional parameters are "recursive", and "random" or "notrandom" parameters. The "recursive" parameter starts a recursive slideshow, adding images from sub-folders. The "random" and "notrandom" parameters override the Randomize setting found in the pictures media window.
StartAndroidActivity(package,[intent,dataType,dataURI]) Launch an Android native app with the given package name. Optional parms (in order): intent, dataType, dataURI. example: StartAndroidActivity(,android.intent.action.VIEW,, v13 Addition
StartPVRManager (Re)Starts the PVR manager v12 Addition
StereoModeToMono Toggle the stereoscopic mode to 2D. v13 Addition
StopPVRManager Stops the PVR manager v12 Addition
StopScript(id) Stop the script by ID or path, if running v12 Addition
Suspend Suspends (S3 / S1 depending on bios setting) the System
System.Exec Execute shell commands.
System.ExecWait Execute shell commands and freezes Kodi until shell is closed.
System.LogOff Log off current user.
TakeScreenshot([filenameandpath,sync]) Takes a Screenshot. You can optionally specify the filename (including the path). Note: only .png files are supported. Add "sync" parameter to run synchronously (slow).
ToggleDebug Enables/disables debug mode v12 Addition
ToggleDirtyRegionVisualization makes dirty regions visible for debugging proposes. v16 Addition
ToggleDPMS Toggle DPMS (VESA Display Power Management Signaling) mode manually
ToggleStereoMode Toggle the stereoscopic mode of the GUI (on/off). v13 Addition
UnloadSkin() Unloads the current skin
UpdateAddonRepos Triggers a forced update of enabled add-on repositories.
UpdateLibrary(database,[path]) Takes either "video" or "music" as a parameter to begin updating the corresponding database. For "video" you can additionally specify a specific path to be scanned.
UpdateLocalAddons Triggers a scan of local add-on directories.
VideoLibrary.Search Brings up a search dialog which will search the library
WakeOnLan(mac) Sends the wake-up packet to the broadcast address for the specified MAC address (Format: FF:FF:FF:FF:FF:FF or FF-FF-FF-FF-FF-FF).
Weather.LocationNext Switch to next weather location
Weather.LocationPrevious Switch to previous weather location
Weather.LocationSet Switch to given weather location (parameter can be 1-3)
Weather.Refresh Force weather data refresh

7 Windows

This table cross-references Window names, Window definitions, Window ID, and the delta Window ID's (this is the delta from the home window.) The code that performs the cross-reference is found in and

  • keymap.xml uses the Window name.
  • Kodi's C++ code uses the Window definitions and Window ID's.
  • ActivateWindow() should use the Window name.
  • sounds.xml should use the window name

You can use secondary parameters with all media windows, as can be seen here:

Name Definition Window ID Delta window ID source XML file
home WINDOW_HOME 10000 0 Home.xml
programs WINDOW_PROGRAMS 10001 1 MyPrograms.xml
pictures WINDOW_PICTURES 10002 2 MyPics.xml
filemanager WINDOW_FILES 10003 3 FileManager.xml
settings WINDOW_SETTINGS_MENU 10004 4 Settings.xml
systeminfo WINDOW_SYSTEM_INFORMATION 10007 7 SettingsSystemInfo.xml
testpattern WINDOW_TEST_PATTERN 10008 8 none
screencalibration WINDOW_MOVIE_CALIBRATION 10011 11 SettingsScreenCalibration.xml
systemsettings WINDOW_SETTINGS_SYSTEM 10016 16 SettingsCategory.xml
servicesettings WINDOW_SETTINGS_SERVICE 10018 18 SettingsCategory.xml
pvrsettings WINDOW_SETTINGS_MYPVR 10021 21 SettingsCategory.xml
videos WINDOW_VIDEO_NAV 10025 25 MyVideoNav.xml
videoplaylist WINDOW_VIDEO_PLAYLIST 10028 28 MyPlaylist.xml
loginscreen WINDOW_LOGINSCREEN 10029 29 LoginScreen.xml
playersettings WINDOW_SETTINGS_PLAYER 10030 30 SettingsCategory.xml
mediasettings WINDOW_SETTINGS_MEDIA 10031 31 SettingsCategory.xml
interfacesettings WINDOW_SETTINGS_INTERFACE 10032 32 SettingsCategory.xml
profiles WINDOW_SETTINGS_PROFILES 10034 34 SettingsProfile.xml
skinsettings WINDOW_SKIN_SETTINGS 10035 35 SkinSettings.xml
addonbrowser WINDOW_ADDON_BROWSER 10040 40 AddonBrowser.xml
eventlog WINDOW_EVENT_LOG 10050 50 EventLog.xml
pointer WINDOW_DIALOG_POINTER 10099 99 Pointer.xml
yesnodialog WINDOW_DIALOG_YES_NO 10100 100 DialogConfirm.xml
progressdialog WINDOW_DIALOG_PROGRESS 10101 101 DialogConfirm.xml
virtualkeyboard WINDOW_DIALOG_KEYBOARD 10103 103 DialogKeyboard.xml
volumebar WINDOW_DIALOG_VOLUME_BAR 10104 104 DialogVolumeBar.xml
contextmenu WINDOW_DIALOG_CONTEXT_MENU 10106 106 DialogContextMenu.xml
notification WINDOW_DIALOG_KAI_TOAST 10107 107 DialogNotification.xml
numericinput WINDOW_DIALOG_NUMERIC 10109 109 DialogNumeric.xml
gamepadinput WINDOW_DIALOG_GAMEPAD 10110 110 DialogSelect.xml
shutdownmenu WINDOW_DIALOG_BUTTON_MENU 10111 111 DialogButtonMenu.xml
playercontrols WINDOW_DIALOG_PLAYER_CONTROLS 10114 114 PlayerControls.xml
seekbar WINDOW_DIALOG_SEEK_BAR 10115 115 DialogSeekBar.xml
playerprocessinfo WINDOW_DIALOG_PLAYER_PROCESS_INFO 10116 116 DialogPlayerProcessInfo.xml
musicosd WINDOW_DIALOG_MUSIC_OSD 10120 120 MusicOSD.xml
visualisationpresetlist WINDOW_DIALOG_VIS_PRESET_LIST 10122 122 DialogSelect.xml
osdvideosettings WINDOW_DIALOG_VIDEO_OSD_SETTINGS 10123 123 DialogSettings.xml
osdaudiosettings WINDOW_DIALOG_AUDIO_OSD_SETTINGS 10124 124 DialogSettings.xml
videobookmarks WINDOW_DIALOG_VIDEO_BOOKMARKS 10125 125 VideoOSDBookmarks.xml
filebrowser WINDOW_DIALOG_FILE_BROWSER 10126 126 FileBrowser.xml
networksetup WINDOW_DIALOG_NETWORK_SETUP 10128 128 DialogSettings.xml
mediasource WINDOW_DIALOG_MEDIA_SOURCE 10129 129 DialogMediaSource.xml
profilesettings WINDOW_DIALOG_PROFILE_SETTINGS 10130 130 DialogSettings.xml
locksettings WINDOW_DIALOG_LOCK_SETTINGS 10131 131 DialogSettings.xml
contentsettings WINDOW_DIALOG_CONTENT_SETTINGS 10132 132 DialogSettings.xml
favourites WINDOW_DIALOG_FAVOURITES 10134 134 DialogFavourites.xml
songinformation WINDOW_DIALOG_SONG_INFO 10135 135 DialogMusicInfo.xml
smartplaylisteditor WINDOW_DIALOG_SMART_PLAYLIST_EDITOR 10136 136 SmartPlaylistEditor.xml
smartplaylistrule WINDOW_DIALOG_SMART_PLAYLIST_RULE 10137 137 SmartPlaylistRule.xml
busydialog WINDOW_DIALOG_BUSY 10138 138 DialogBusy.xml
pictureinfo WINDOW_DIALOG_PICTURE_INFO 10139 139 DialogPictureInfo.xml
addonsettings WINDOW_DIALOG_ADDON_SETTINGS 10140 140 DialogAddonSettings.xml
accesspoints WINDOW_DIALOG_ACCESS_POINTS 10141 141 DialogAccessPoints.xml
fullscreeninfo WINDOW_DIALOG_FULLSCREEN_INFO 10142 142 DialogFullScreenInfo.xml
sliderdialog WINDOW_DIALOG_SLIDER 10145 145 DialogSlider.xml
addoninformation WINDOW_DIALOG_ADDON_INFO 10146 146 DialogAddonInfo.xml
textviewer WINDOW_DIALOG_TEXT_VIEWER 10147 147 DialogTextViewer.xml
peripherals WINDOW_DIALOG_PERIPHERAL_MANAGER 10149 149 DialogSelect.xml
peripheralsettings WINDOW_DIALOG_PERIPHERAL_SETTINGS 10150 150 DialogSettings.xml
extendedprogressdialog WINDOW_DIALOG_EXT_PROGRESS 10151 151 DialogExtendedProgressBar.xml
mediafilter WINDOW_DIALOG_MEDIA_FILTER 10152 152 DialogSettings.xml
subtitlesearch WINDOW_DIALOG_SUBTITLES 10153 153 DialogSubtitles.xml
audiodspmanager WINDOW_DIALOG_AUDIO_DSP_MANAGER 10154 154 DialogAudioDSPManager.xml
osdaudiodspsettings WINDOW_DIALOG_AUDIO_DSP_OSD_SETTINGS 10155 155 DialogSettings.xml
osdcmssettings WINDOW_DIALOG_CMS_OSD_SETTINGS 10157 157 DialogSettings.xml
musicplaylist WINDOW_MUSIC_PLAYLIST 10500 500 MyPlaylist.xml
music WINDOW_MUSIC_NAV 10502 502 MyMusicNav.xml
musicplaylisteditor WINDOW_MUSIC_PLAYLIST_EDITOR 10503 503 MyMusicPlaylistEditor.xml
pvrguideinfo WINDOW_DIALOG_PVR_GUIDE_INFO 10600 600 DialogPVRInfo.xml
pvrrecordinginfo WINDOW_DIALOG_PVR_RECORDING_INFO 10601 601 DialogPVRInfo.xml
pvrtimersetting WINDOW_DIALOG_PVR_TIMER_SETTING 10602 602 DialogSettings.xml
pvrgroupmanager WINDOW_DIALOG_PVR_GROUP_MANAGER 10603 603 DialogPVRGroupManager.xml
pvrchannelmanager WINDOW_DIALOG_PVR_CHANNEL_MANAGER 10604 604 DialogPVRChannelManager.xml
pvrguidesearch WINDOW_DIALOG_PVR_GUIDE_SEARCH 10605 605 DialogPVRGuideSearch.xml
pvrchannelscan WINDOW_DIALOG_PVR_CHANNEL_SCAN 10606 606 none (unused)
pvrupdateprogress WINDOW_DIALOG_PVR_UPDATE_PROGRESS 10607 607 none (unused)
pvrosdchannels WINDOW_DIALOG_PVR_OSD_CHANNELS 10608 608 DialogPVRChannelsOSD.xml
pvrosdguide WINDOW_DIALOG_PVR_OSD_GUIDE 10609 609 DialogPVRGuideOSD.xml
pvrradiordsinfo WINDOW_DIALOG_PVR_RADIO_RDS_INFO 10610 610 DialogPVRRadioRDSInfo.xml
tvchannels WINDOW_TV_CHANNELS 10700 700 MyPVRChannels.xml
tvrecordings WINDOW_TV_RECORDINGS 10701 701 MyPVRRecordings.xml
tvguide WINDOW_TV_GUIDE 10702 702 MyPVRGuide.xml
tvtimers WINDOW_TV_TIMERS 10703 703 MyPVRTimers.xml
tvsearch WINDOW_TV_SEARCH 10704 704 MyPVRSearch.xml
radiochannels WINDOW_RADIO_CHANNELS 10705 705 MyPVRChannels.xml
radiorecordings WINDOW_RADIO_RECORDINGS 10706 706 MyPVRRecordings.xml
radioguide WINDOW_RADIO_GUIDE 10707 707 MyPVRGuide.xml
radiotimers WINDOW_RADIO_TIMERS 10708 708 MyPVRTimers.xml
radiosearch WINDOW_RADIO_SEARCH 10709 709 MyPVRSearch.xml
tvtimerrules WINDOW_TV_TIMER_RULES 10710 710 MyPVRTimers.xml
radiotimerrules WINDOW_RADIO_TIMER_RULES 10711 711 MyPVRTimers.xml
FullscreenLiveTV WINDOW_FULLSCREEN_LIVETV 10800 800 None (shortcut to fullscreenvideo)
fullscreenradio WINDOW_FULLSCREEN_RADIO 10801 801 None (shortcut to visualisation)
gamecontrollers WINDOW_DIALOG_GAME_CONTROLLERS 10820 820 DialogGameControllers.xml
Custom Skin Windows - - 1100–1199 custom*.xml
selectdialog WINDOW_DIALOG_SELECT 12000 2000 DialogSelect.xml
musicinformation WINDOW_DIALOG_MUSIC_INFO 12001 2001 DialogMusicInfo.xml
okdialog WINDOW_DIALOG_OK 12002 2002 DialogConfirm.xml
movieinformation WINDOW_DIALOG_VIDEO_INFO 12003 2003 DialogVideoInfo.xml
fullscreenvideo WINDOW_FULLSCREEN_VIDEO 12005 2005 VideoFullScreen.xml
visualisation WINDOW_VISUALISATION 12006 2006 MusicVisualisation.xml
slideshow WINDOW_SLIDESHOW 12007 2007 SlideShow.xml
weather WINDOW_WEATHER 12600 2600 MyWeather.xml
screensaver WINDOW_SCREENSAVER 12900 2900 none
videoosd WINDOW_OSD 12901 2901 VideoOSD.xml
videomenu WINDOW_MEDIA_MENU 12902 2902 none
startwindow WINDOW_START 12998 2998 shortcut to the current startwindow
startup WINDOW_STARTUP_ANIM 12999 2999 Startup.xml
In addition, there are the following "special" windows whose id is not really a concern (and you'll notice isn't unique)
(Python Windows) - - 3000–3099 none
addon - - 4000–4099 none

8 Additional keys

Other keys that can be mapped to actions.

8.1 Media keyboards/remotes

  • browser_back
  • browser_forward
  • browser_refresh
  • browser_stop
  • browser_search
  • browser_favorites
  • browser_home
  • volume_mute
  • volume_down
  • volume_up
  • next_track
  • prev_track
  • stop
  • play_pause
  • launch_mail
  • launch_media_select
  • launch_app1
  • launch_app2
  • play
  • pause
  • fastforward
  • rewind
  • channelup
  • channeldown

8.2 Mouse actions

  • leftclick
  • rightclick
  • middleclick
  • doubleclick
  • wheelup
  • wheeldown
  • mousemove
  • mousedrag
  • mousedragstart
  • mousedragend
  • mouserdrag - right button drag
  • mouserdragstart - start of right button drag
  • mouserdragend - end of right button drag

9 Examples and pre-made keymaps

See: Category:Custom keymaps

10 See also


Personal tools

Wiki help