Input maps to map various kinds of input keys into commands. You can see https://support.plex.tv/articles/216459997-create-your-own-inputmap/ for basic instructions in input maps. The input maps all have an idmatcher which is a regular expression to match against the id of the input and each key is matched via a regular expression to one or multiple actions (see doc for more information).
In this same directory is a directory named default. This contains the default mappings and is always copied from the application's actual default mappings. Changes to files in this dir will not affect anything and will be overwritten on the next launch of the application. If you wish to override the defaults, copy the relevant input map out of the default directory and into this directory and make your modifications to that file. Any files in this directory which have the same name will override any previously read files with the name.
Plex HTPC supports keyboard literals (such as A) as well as a set of commands. The set of supported commands is:
backcycle_aspect_ratiocycle_audiocycle_audio_backcycle_subtitlescycle_subtitles_backdebug: Display debug information overlaydecrease_audio_delaydecrease_subtitles_delaydecrease_volumedownenterexithomeincrease_audio_delayincrease_subtitles_delayincrease_volumeinfojump+{letter}: Jumps to the specified letter (or number) in an alphabetical listleftmpv:{command}: Sends a raw command into mpv. Example:mpv:set sub-scale=2.next_pivot_tabpauseplayplay_pausepoweroffprevious_pivot_tabrebootrightsearchseek_backwardseek_forwardskip_previousskip_nextstep_backwardstep_forwardstopsuspendtoggle_fullscreentoggle_subtitlestoggle_watchedup
The set of keys for some inputs is restricted to a pre-defined set. Sometimes guessing the key for a particular input action can go awry so if this is in doubt, check the application logs; it will log the input it sees even if it doesn't have an action to take on it. Some examples of known inputs are provided below:
Keyboard keys are typically the raw key that is pressed along with modifiers. Modifiers are prefixed with the modifier string followed by a + and the actual key. See https://doc.qt.io/qt-5/qkeysequence.html#toString for more information on the format of this string. Note: On the Mac the modifiers are not always named as you expect. The cmd key is named Ctrl, the opt key is named Alt, and the ctrl key is named Meta. Pressing cmd-ctrl-opt-shft-h results in the input key: Ctrl+Meta+Alt+Shift+H (respectively).
Note: Particular CEC setups may not send certain keys into the application; this is the full set of keys the library currently supports and could potentially make it into the application.
KEY_AN_CHANNELS_LISTKEY_AN_RETURNKEY_ANGLEKEY_BACKKEY_BLUEKEY_CHANNEL_DOWNKEY_CHANNEL_UPKEY_CLEARKEY_CONTENTS_MENUKEY_DATAKEY_DOTKEY_DOWNKEY_DVD_MENUKEY_EJECTKEY_ELECTRONIC_PROGRAM_GUIDEKEY_ENTERKEY_F5KEY_FAVORITE_MENUKEY_GREENKEY_GUIDEKEY_HELPKEY_HOMEKEY_INFOKEY_INITIAL_CONFIGURATIONKEY_INPUT_SELECTKEY_LEFTKEY_MENUKEY_MUTE_FUNCTIONKEY_MUTEKEY_NEXT_FAVORITEKEY_NEXTKEY_NUMERIC_0KEY_NUMERIC_1KEY_NUMERIC_11KEY_NUMERIC_12KEY_NUMERIC_2KEY_NUMERIC_3KEY_NUMERIC_4KEY_NUMERIC_5KEY_NUMERIC_6KEY_NUMERIC_7KEY_NUMERIC_8KEY_NUMERIC_9KEY_PAGE_DOWNKEY_PAGE_UPKEY_PAUSE_PLAY_FUNCTIONKEY_PAUSE_RECORD_FUNCTIONKEY_PAUSE_RECORDKEY_PAUSEKEY_PLAY_FUNCTIONKEY_PLAYKEY_POWER_OFF_FUNCTIONKEY_POWER_ON_FUNCTIONKEY_POWER_TOGGLE_FUNCTIONKEY_POWERKEY_PREVKEY_PREVIOUS_CHANNELKEY_RECORD_FUNCTIONKEY_RECORDKEY_REDKEY_RESTORE_VOLUME_FUNCTIONKEY_RIGHTKEY_SEEKBCKKEY_SEEKFWDKEY_SELECT_AUDIO_INPUT_FUNCTIONKEY_SELECT_AV_INPUT_FUNCTIONKEY_SELECT_BROADCAST_TYPEKEY_SELECT_MEDIA_FUNCTIONKEY_SELECT_SOUND_PRESENTATIONKEY_SELECTKEY_SETUP_MENUKEY_SOUND_SELECTKEY_STOP_FUNCTIONKEY_STOP_RECORDKEY_STOPKEY_SUBTITLESKEY_TIMER_PROGRAMMINGKEY_TOP_MENUKEY_TUNE_FUNCTIONKEY_UPKEY_VIDEO_ON_DEMANDKEY_VOLUME_DOWNKEY_VOLUME_UPKEY_YELLOW
Joystick "Keys" are mostly named as KEY_BUTTON_n for the nth button and KEY_AXIS_m_UP for the mth axis (with DOWN instead of UP to indicate a "downwards" direction). Note that the numbers for n and m can differ across controllers and even different mechanims of accessing the same controller. Check the logs when unsure about the naming of keys.
Some joysticks are disabled by default (by commenting out the idmatcher) because they can cause conflicts if enabled by default. See individual json files for details.
LIRC keys names come directly from the LIRC mapping. If an IR command is configured in LIRC to send the key KEY_LALALA, then the key in the input mapping will be KEY_LALALA.