Skip to content

Commit

Permalink
Merge pull request #24700 from bjsvedin/joystick-keymap-overloading
Browse files Browse the repository at this point in the history
  • Loading branch information
jenkins4kodi committed May 10, 2024
2 parents f1267eb + b2211b5 commit 5b97125
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
25 changes: 20 additions & 5 deletions system/keymaps/joystick.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,29 @@
<!-- <a holdtime="500">ContextMenu</a> -->
<!-- </joystick> -->
<!-- -->
<!-- Buttons can be also require hotkeys to be pressed: -->
<!-- Buttons can be overloaded with hotkeys: -->
<!-- <joystick profile="game.controller.default"> -->
<!-- <start hotkey="back">Stop</start> -->
<!-- <a>Select</a> -->
<!-- <a hotkey="back">ContextMenu</a> -->
<!-- </joystick> -->
<!-- -->
<!-- It is even possible to combine both hotkeys and hold durations: -->
<!-- <joystick profile="game.controller.default"> -->
<!-- <a>Select</a> -->
<!-- <a hotkey="back">ContextMenu</a> -->
<!-- <a hotkey="back" holdtime="500">Stop</a> -->
<!-- </joystick> -->
<!-- -->
<!-- Both hold duration and hotkeys can be the only stand alone variant of -->
<!-- an action: -->
<!-- <joystick profile="game.controller.default"> -->
<!-- <a hotkey="back">ContextMenu</a> -->
<!-- <b holdtime="500">Stop</b> -->
<!-- </joystick> -->
<!-- -->
<!-- Due to limitations in the button mapper, buttons can be overloaded with -->
<!-- different hold durations, but not different hotkeys for the same -->
<!-- duration. -->
<!-- A limitation is that if a single press is mapped in a section, a -->
<!-- global "holdtime" overload will be ignored. The workaround is to -->
<!-- duplicate the holdtime overload in the section. -->
<!-- -->
<!-- More documentation on keymaps can be found on -->
<!-- http://kodi.wiki/view/keymaps -->
Expand Down
2 changes: 1 addition & 1 deletion xbmc/input/keymaps/KeymapTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct KeymapAction
struct KeymapActionGroup
{
int windowId = -1;
std::set<KeymapAction> actions;
std::multiset<KeymapAction> actions;
};
} // namespace KEYMAP
} // namespace KODI

0 comments on commit 5b97125

Please sign in to comment.