7116 Commits

Author SHA1 Message Date
Bastien Bouclet
43184657e9 EVENTS: Disable ScummVM's source of keyboard repeat events by default
Backends can still (and do) generate such events. This works around an
issue with the keymapper where the "DOWN" event would be mapped to a
key, but the corresponding "UP" event would be mapped to another one due
to a keymap change. The keyboard repeat generation system would believe
the key to be still pressed and send a continuous stream of repeat
events.
Ideally the keymapper should be fixed to always generate matching event
pairs. However this source of an infinite stream of events still looks
like trouble waiting to happen to me. Hence disabling it by default.
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
c131e8f5b9 EVENTS: Use the keymapper for some previously hard-coded key bindings 2020-01-29 08:51:29 +01:00
Bastien Bouclet
7617723ab5 KEYMAPPER: Allow backends to register multiple keymaps 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
8dd2b7ca39 EVENTS: Expose the primary global keymap builder 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
5a62837f04 MAEMO: Adapt to the new keymapper API 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
Bastien Bouclet
b7a816f1eb KEYMAPPER: Clean up the classes dependencies 2020-01-26 19:07:53 +01:00
rsn8887
1489f2ed0f OPENGL: Fix GUI centering when using Fit to window (4:3) mode 2020-01-23 15:06:08 -06:00
Thierry Crozat
ea53202de9 IPHONE: Disable idle timer while an engine is running 2020-01-23 20:33:37 +00:00
Bastien Bouclet
0339b9a6bf SDL: Use the name of the running target as a base for screenshot files 2020-01-22 21:27:38 +02:00
rsn8887
b8cf747ad5 OPENGL: Implement stretch mode Fit to window (4:3) 2020-01-22 04:24:42 -06:00
Cameron Cawley
9fc24522d7 BACKENDS: Add more keycodes 2020-01-21 03:28:22 +02:00
rsn8887
12977d07d6 SWITCH: Update platform readme and include it in zip 2020-01-20 18:37:06 -06:00
Cameron Cawley
c9824ad206 ANDROID: Improve handling of system keys
- Unrecognised system keys are treated as regular keys.
- Key down events are always sent when pressing the Menu or Back buttons.
2020-01-20 21:36:05 +00:00