KEMBAR78
KEYMAPPER: Allow multiple inputs bound to a keymap action as defaults by antoniou79 · Pull Request #4830 · scummvm/scummvm · GitHub
Skip to content

Conversation

@antoniou79
Copy link
Contributor

This allows backeds to override a keymap action mapping with lists of mapped hardware inputs instead of just one hardware input id

However, it will still be an overridding, so it will require all hardware input ids for a given keymap action to be added. In other words, if a backend uses addDefaultBinding() for a given action, it will not ADD to any existing mappings of the action, other than the ones that the backend itself has added (with addDefaultBinding())

Pros: Extended functionality, resolves an issue with Android controller devices (virtual mouse movement needing to be mapped to DPAD directional keys and (left) joystick movements).

Cons: Adds complexity to the implementation, and does not keep any mappings to an action that are set elsewhere -- it still overrides the mappings with new ones added using addDefaultBinding().

… defaults

This allows backeds to override a keymap action mapping with lists of mapped hardware inputs instead of just one hardware input id

However, it will still be an overridding, so it will require all hardware input ids for a given keymap action to be added.
In other words, if a backend uses addDefaultBinding() for a given action, it will not ADD to any existing mappings of the action,
other than the ones that the backend itself has added (with addDefaultBinding())
@antoniou79 antoniou79 requested review from criezy and sev- March 21, 2023 12:57
Copy link
Member

@criezy criezy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is only a minor formatting issue.
Otherwise the change is simple enough, only changing a String to a StringArray to allow specifying multiple bindings for an action.

Cons: does not keep any mappings to an action that are set elsewhere -- it still overrides the mappings with new ones

Supporting the possibility to add to rather than replace bindings could indeed be a nice addition. But the change as proposed here already looks like a good improvement.

@sev- sev- merged commit 3565d0e into scummvm:master Mar 24, 2023
sev- pushed a commit that referenced this pull request Mar 24, 2023
…#4830)

This allows backeds to override a keymap action mapping with lists of mapped hardware inputs instead of just one hardware input id

However, it will still be an overridding, so it will require all hardware input ids for a given keymap action to be added.
In other words, if a backend uses addDefaultBinding() for a given action, it will not ADD to any existing mappings of the action,
other than the ones that the backend itself has added (with addDefaultBinding())
sev- pushed a commit that referenced this pull request Mar 24, 2023
…#4830)

This allows backeds to override a keymap action mapping with lists of mapped hardware inputs instead of just one hardware input id

However, it will still be an overridding, so it will require all hardware input ids for a given keymap action to be added.
In other words, if a backend uses addDefaultBinding() for a given action, it will not ADD to any existing mappings of the action,
other than the ones that the backend itself has added (with addDefaultBinding())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants