I am having an issue with inputmaps. It appears that my Xbox Elite 2 controller inputs are not detected, even though Plex HTPC detects the joystick. I took the following steps:
- Navigate to
C:\Users\MyUser\AppData\Local\Plex HTPC\inputmaps - Copy file
.\examples\xbox-one.jsonto.\xbox-one.json - Edit the
xbox-one.jsonfile, replace"idmatcher": "Xbox One S Controller",with"idmatcher": "Xbox One Elite 2 Controller",
I have tried changing the name of the copied file be different from the example file. I have also tried changing the "name" JSON value not to match the example file.
I have also tried setting idmatcher to Xbox One.*, Xbox.*, .*, and even tried "XInput.*|Microsoft.*joystick driver" like in PlexMediaPlayer.
Plex HTPC clearly detects the controller as a joystick, but I cannot tell if it associates an inputmap config to it. At no point do I see expected input keycodes like "KEY_BUTTON_1" or "KEY_AXIS_0_DOWN" in the logs.
Here are my logs relating to Input:
Jan 05, 2022 19:36:09.764 [7176] DEBUG - [InputManager] Initializing.
Jan 05, 2022 19:36:09.765 [7176] INFO - [InputManager] Loading inputmaps from: C:/Program Files/Plex/Plex HTPC/inputmaps
Jan 05, 2022 19:36:09.771 [7176] INFO - [InputManager] Loading inputmaps from: C:/Users/MyUser/AppData/Local/Plex HTPC/inputmaps
Jan 05, 2022 19:36:09.818 [7176] INFO - [InputManager/Keyboard] Successfully inited input
Jan 05, 2022 19:36:09.818 [7176] DEBUG - [InputManager/QHotkey/QHotkeyInput] Initializing.
Jan 05, 2022 19:36:09.818 [7176] WARN - [InputManager/QHotkey/QHotkeyInput] Unable to map shortcut to native keys. Key: Qt::Key_MediaPause Modifiers: QFlags<Qt::KeyboardModifier>(NoModifier)
Jan 05, 2022 19:36:09.818 [7176] WARN - [InputManager/QHotkey/QHotkeyInput] Unable to map shortcut to native keys. Key: Qt::Key_MediaTogglePlayPause Modifiers: QFlags<Qt::KeyboardModifier>(NoModifier)
Jan 05, 2022 19:36:09.818 [7176] INFO - [InputManager/QHotkey] Successfully inited input
Jan 05, 2022 19:36:10.066 [11660] INFO - [Input/SDL] Found 1 joysticks
Jan 05, 2022 19:36:10.067 [11660] INFO - [Input/SDL] JoyStick #0 is Xbox One Elite 2 Controller with 16 buttons and 6 axes
Jan 05, 2022 19:36:10.067 [7176] INFO - [InputManager/SDL] Successfully inited input
Jan 05, 2022 19:36:10.068 [11660] INFO - [Input/SDL] Detected device was added.
Jan 05, 2022 19:36:10.068 [11660] INFO - [Input/SDL] Found 1 joysticks
Jan 05, 2022 19:36:10.068 [11660] INFO - [Input/SDL] JoyStick #0 is Xbox One Elite 2 Controller with 16 buttons and 6 axes
Jan 05, 2022 19:36:10.069 [10456] INFO - libCEC was successfully initialized, found version 262151
Jan 05, 2022 19:36:10.071 [7176] INFO - [InputManager/CEC] Successfully inited input
Jan 05, 2022 19:36:10.071 [7176] INFO - [DisplayManager] Found 3 Display(s).
Jan 05, 2022 19:36:10.071 [7176] INFO - [DisplayManager] Available modes for Display Name: NVIDIA GeForce RTX 3080 Ti
I also have an Xbox chatpad keyboard, to which Plex HTPC does indeed respond to keyboard events.
Jan 05, 2022 19:49:35.182 [16896] INFO - [Web] 00/03/2022 19:49:35:182 [*****:*****] DEBUG [ClickAbsorber]: Absorbed a click!
Jan 05, 2022 19:49:36.022 [16896] INFO - [Web] 00/03/2022 19:49:36:021 [*****:*****] DEBUG [ClickAbsorber]: Absorbed a click!
Jan 05, 2022 19:49:36.667 [16896] DEBUG - [InputManager] Input received: source: Keyboard keycode: M:3
Jan 05, 2022 19:49:36.667 [16896] DEBUG - [InputManager] Emit input action: ["M","menu"]
Jan 05, 2022 19:49:36.668 [16896] INFO - [InputManager] [InputConnector] Sending actions to UI: ["M","menu"]
Jan 05, 2022 19:49:36.683 [16896] DEBUG - [InputManager] Input received: source: Keyboard keycode: M:1
My temporary working solution is to use ReWASD to associate a profile with PlexHTPC.exe and remap my controller inputs to the keyboard, but this is brittle and cumbersome.
For what it’s worth, this same Xbox controller is detected by and works just fine with PlexMediaPlayer with the default example inputmap xbox-controller-windows.json. Here are some example logs:
2022-01-05 19:55:32 [ DEBUG ] InputComponent.cpp @ 160 - Input received: source: "Microsoft PC-joystick driver" keycode: "KEY_AXIS_0_DOWN" : InputBase::InputkeyState(KeyDown)
2022-01-05 19:55:32 [ DEBUG ] CachedRegexMatcher.cpp @ 68 - No match for: "KEY_AXIS_0_DOWN"
2022-01-05 19:55:32 [ DEBUG ] InputComponent.cpp @ 229 - Emit input action: ("right")
2022-01-05 19:55:32 [ DEBUG ] InputSDL.cpp @ 153 - JoyAxisMotion: 1 -649
2022-01-05 19:55:32 [ DEBUG ] InputSDL.cpp @ 153 - JoyAxisMotion: 0 22282
2022-01-05 19:55:32 [ DEBUG ] InputSDL.cpp @ 153 - JoyAxisMotion: 1 -2549
2022-01-05 19:55:32 [ DEBUG ] InputSDL.cpp @ 153 - JoyAxisMotion: 0 -25
2022-01-05 19:55:32 [ DEBUG ] InputSDL.cpp @ 153 - JoyAxisMotion: 1 -1767
2022-01-05 19:55:32 [ DEBUG ] InputComponent.cpp @ 160 - Input received: source: "Microsoft PC-joystick driver" keycode: "KEY_AXIS_0_DOWN" : InputBase::InputkeyState(KeyUp)
2022-01-05 19:55:32 [ DEBUG ] InputSDL.cpp @ 153 - JoyAxisMotion: 1 220
2022-01-05 19:55:33 [ DEBUG ] InputSDL.cpp @ 153 - JoyAxisMotion: 1 620
2022-01-05 19:55:33 [ DEBUG ] InputSDL.cpp @ 153 - JoyAxisMotion: 1 1049
2022-01-05 19:55:33 [ DEBUG ] InputSDL.cpp @ 153 - JoyAxisMotion: 1 1360
2022-01-05 19:55:33 [ DEBUG ] InputSDL.cpp @ 153 - JoyAxisMotion: 0 264
2022-01-05 19:55:33 [ DEBUG ] InputSDL.cpp @ 153 - JoyAxisMotion: 1 2937
2022-01-05 19:55:33 [ DEBUG ] InputSDL.cpp @ 153 - JoyAxisMotion: 0 3537
2022-01-05 19:55:33 [ DEBUG ] InputSDL.cpp @ 153 - JoyAxisMotion: 1 32576
2022-01-05 19:55:33 [ DEBUG ] InputComponent.cpp @ 160 - Input received: source: "Microsoft PC-joystick driver" keycode: "KEY_AXIS_1_DOWN" : InputBase::InputkeyState(KeyDown)
2022-01-05 19:55:33 [ DEBUG ] CachedRegexMatcher.cpp @ 68 - No match for: "KEY_AXIS_1_DOWN"
2022-01-05 19:55:33 [ DEBUG ] InputComponent.cpp @ 229 - Emit input action: ("down")
Would greatly appreciate any help with this. Otherwise Plex HTPC looks great!