Commit Graph

161 Commits

Author SHA1 Message Date
Cameron Cawley
1605b72ee8 BACKENDS: Add events for additional mouse buttons 2020-02-26 21:34:24 +01:00
Bastien Bouclet
9475192e81 ENGINES: Add a keymaps tab in the in-game options dialog 2020-02-22 13:14:04 +02:00
lolbot-iichan
7edaf3f2f7 KEYMAPPER: Enable remapping of the mouse wheel 2020-02-19 08:04:25 +02:00
Bastien Bouclet
e069f25e3a KEYMAPPER: Remove the debugger standard action
It is no longer used
2020-02-16 15:35:46 +01:00
Bastien Bouclet
29dd15af0c KEYMAPPER: Enable remapping the keyboard modifier keys 2020-02-14 19:30:00 +01:00
Bastien Bouclet
fbc938f438 KEYMAPPER: Fix remapping keys with multiple modifiers pressed 2020-02-13 07:57:02 +01:00
Bastien Bouclet
2177e685b7 KEYMAPPER: Allow joystick half axes to be remapped 2020-02-09 08:34:16 -06:00
rsn8887
eea70a3c8c BACKEND: Allow SDL2 mapping of L2/R2, fix psp2/switch mapping 2020-02-09 08:34:16 -06:00
Bastien Bouclet
3567c4f159 BASE: Reset the keymapper on RTL with dynamic plugins enabled
When returning to the launcher with dynamic plugins enabled, the config manager
is re-created, invalidating the pointers the keymapper keeps to the
configuration domains.

Fixes #11348.
2020-02-09 07:29:43 +01:00
Bastien Bouclet
4ad06f476b KEYMAPPER: Do a better job at keeping track of the mouse position 2020-02-01 09:36:09 +01:00
Eugene Sandulenko
9f168ae447 KEYMAPPER: Fix class/struct declaration mess. 2020-01-29 16:48:46 +01:00
Eugene Sandulenko
d1805a582e BACKENDS: KEYMAPPER: Hid noisy warning 2020-01-29 16:48:46 +01:00
Bastien Bouclet
2ef7365401 KEYMAPPER: Change backend default bindings to replace keymap defaults
Previously backend defaults where added to the keymap defaults.
However, it became apparent backends need to change the default bindings
to resolve conflicts.
2020-01-29 08:51:30 +01:00
Bastien Bouclet
cc15496e9e KEYMAPPER: Use a dropdown button to save horizontal space 2020-01-29 08:51:30 +01:00
Bastien Bouclet
5079fa9dd4 KEYMAPPER: Sort the mappings by type and id in the remap dialog 2020-01-29 08:51:29 +01:00
Bastien Bouclet
17a13c9294 KEYMAPPER: Shorten the name of some joystick inputs
So they fit more easily in the remap dialog
2020-01-29 08:51:29 +01:00
Bastien Bouclet
c001094bce KEYMAPPER: Add a button in the remap dialog to reset an entire keymap 2020-01-29 08:51:29 +01:00
Bastien Bouclet
7ecccd3b30 MOHAWK: RIVEN: Add default joystick action mappings 2020-01-29 08:51:29 +01:00
Bastien Bouclet
e973092aef KEYMAPPER: Enable remapping of the mouse buttons 2020-01-29 08:51:29 +01:00
Bastien Bouclet
519b4a57e2 KEYMAPPER: Allow engines to return multiple keymaps
The idea is that keymaps may be situational. A keymap may be always
enabled, while another one may be enabled only during combat..
2020-01-29 08:51:29 +01:00
Bastien Bouclet
426867f4bc KEYMAPPER: Give human readable descriptions to the keymaps 2020-01-29 08:51:29 +01:00
Bastien Bouclet
32174c9067 KEYMAPPER: Actions can now be bound to joystick buttons 2020-01-29 08:51:29 +01:00
Bastien Bouclet
df7ce0c55f KEYMAPPER: Rework HardwareInputSet not to allocate all possible inputs 2020-01-29 08:51:29 +01:00
Bastien Bouclet
0995f40677 MOHAWK: RIVEN: Use custom engine actions for event handing 2020-01-29 08:51:29 +01:00
Bastien Bouclet
df4bf6556c KEYMAPPER: Introduce custom engine actions
Custom engine actions are a new type of event the Keymapper can produce.
When an engine declares its keymap, it can declare it wants to receive
custom action events when the corresponding key is pressed, instead of
the originating hardware input events.

This system allows:
* Key bindings to be specified only once when declaring the keymap,
  instead of twice (when handling the events).
* To truly rebind keys in the keymaps dialog. When using traditional
  event mapping, the keymapper remaps the user keypress to the keypress
  expected by the game engine to perform the action. However, the engine
  still accepts the original keys.

The new concept of 'standard actions' defines a set of engine actions
that are commonly available in the games supported by ScummVM. Backends
can define default bindings for the standard actions to hardware
specific input devices.
2020-01-29 08:51:29 +01:00
Bastien Bouclet
13fbdb935a KEYMAPPER: Use custom backend actions for the SDL graphics keymap 2020-01-29 08:51:29 +01:00
Bastien Bouclet
be49fc4b9a SDL: Add a keymap for the graphics manager 2020-01-29 08:51:29 +01:00
Bastien Bouclet
ec9c394787 KEYMAPPER: Remove DefaultEventMapper
Now the keymapper is enabled by default, it does not make sense to have
a separate class anymore.
2020-01-29 08:51:29 +01:00
Bastien Bouclet
14663c4790 KEYMAPPER: Make the keymapper mandatory 2020-01-29 08:51:29 +01:00
Bastien Bouclet
cc336635a1 KEYMAPPER: Change custom backend action events not to be instant
Allows action consumers to choose if they want to react on the start or
on the end of an user interaction.
2020-01-29 08:51:29 +01:00
Bastien Bouclet
2d7588d9c3 EVENTS: Remove the dependency to EventSource from EventMapper 2020-01-29 08:51:29 +01:00
Filippos Karapetis
1b116170fa KEYMAPPER: Fix forward declarations of HardwareInput 2020-01-27 02:33:39 +02:00
Bastien Bouclet
511d138bbc KEYMAPPER: Move the remap dialog to an option dialog tab
The aim is to make it easy to discover, and possible to use without a
keyboard.
2020-01-26 23:09:08 +02:00
Bastien Bouclet
19de568e24 KEYMAPPER: Untangle the dependencies between Action and Keymap 2020-01-26 23:09:08 +02:00
Bastien Bouclet
285b10beef KEYMAPPER: Store hardware inputs into maps 2020-01-26 19:07:53 +01:00
Bastien Bouclet
3d48b54288 KEYMAPPER: Remove the ascii value from the hardware keys
The ascii value is for text input, which is not related to hotkeys.
2020-01-26 19:07:53 +01:00
Bastien Bouclet
d60190b12e ENGINES: Define default bindings for the existing engine keymaps 2020-01-26 19:07:53 +01:00
Bastien Bouclet
576982bc33 KEYMAPPER: Use the default action bindings defined by the backends 2020-01-26 19:07:53 +01:00
Bastien Bouclet
17791e2f7d KEYMAPPER: Actions can now have default mappings 2020-01-26 19:07:53 +01:00
Bastien Bouclet
ade0efa762 KEYMAPPER: Multiple inputs can map to the same action 2020-01-26 19:07:53 +01:00
Bastien Bouclet
d5e2b5d8f2 KEYMAPPER: Make it clear the keymaps are owned by the keymapper
Also free all the remaining keymaps when freeing the keymapper.
2020-01-26 19:07:53 +01:00
Bastien Bouclet
729cd24c0b KEYMAPPER: Change the keymap action list to be an Array 2020-01-26 19:07:53 +01:00
Bastien Bouclet
3b5016a62d KEYMAPPER: Change the remap dialog to use a scrollable container 2020-01-26 19:07:53 +01:00
Bastien Bouclet
9c0bc2b633 KEYMAPPER: Simplify the way keymaps are enabled and disabled 2020-01-26 19:07:53 +01:00
Bastien Bouclet
ac44469558 KEYMAPPER: Remove the domain class 2020-01-26 19:07:53 +01:00
Bastien Bouclet
930ff55421 KEYMAPPER: Simplify the event mapping logic 2020-01-26 19:07:53 +01:00
Bastien Bouclet
7edff01e69 KEYMAPPER: Move the remap event capture logic out of the keymapper 2020-01-26 19:07:53 +01:00
Bastien Bouclet
28e3f2aed7 KEYMAPPER: Remove dead code 2020-01-26 19:07:53 +01:00
Bastien Bouclet
e197a75829 KEYMAPPER: Action can generate only a single event 2020-01-26 19:07:53 +01:00
Bastien Bouclet
a449b87c5d KEYMAPPER: Remove action id length restriction 2020-01-26 19:07:53 +01:00