scummVM change keyboard maps on gamepad
-
@ectoone
This is interesting since there are some buttons available. How would I go adding the "ALT" Keyboard button? By replacing "F1" in your example with "ALT" or "RALT" or something? -
@coldnpale No, you carry out the commands in a terminal session instead of installing from the setup script.
Also, it is these lines in the
sdl-events.cpp
file that you will need to edit. -
@dudleydes
got it! Thanks! -
So.. I used jstest to find the correct controller buttons for my logitech F710. Apparently for my controller it has to be
#define JOY_BUT_LMOUSE 0
#define JOY_BUT_RMOUSE 2
#define JOY_BUT_ESCAPE 3
#define JOY_BUT_PERIOD 1
#define JOY_BUT_SPACE 8
#define JOY_BUT_F5 9Now I just need to wait some time to build it
-
@coldnpale If you take a look at the lines 350+ in the
sdl-events.cpp
file, you can see allSDLK_*
andKEYCODE_*
values. In your case you need to use LALT or RALT. -
So, thanks to dudledes and EctoOne I managed to map the buttons! I appreciate a lot your help, thanks a lot for taking the time to guide me so thoroughly!
One last question, if I need to change/add buttons will I have to repeat the process again? I am asking in case of an update. I guess if I update the scummvm the controls will be overwritten.
-
@coldnpale Glad to hear it worked.
You should use the above method to change or add buttons or if you wish to update to a new version of ScummVM. Installing from the setup script will have the default gamepad mappings.
-
@dudleydes
Better than nothing. At least we have a means to make the changes. I guess I won't be updating too often though ... :P -
Some games block F5 key. So i map the combination ctrl+f5 to the left button of my ps3 controller.
#define JOY_BUT_LMOUSE 14 #define JOY_BUT_RMOUSE 13 #define JOY_BUT_ESCAPE 15 #define JOY_BUT_PERIOD 12 #define JOY_BUT_SPACE 0 #define JOY_BUT_F5 3 #define JOY_BUT_MENU 10 case JOY_BUT_MENU: event.kbd.flags = Common::KBD_CTRL; event.kbd.keycode = Common::KEYCODE_F5; event.kbd.ascii = mapKey(SDLK_F5, (SDLMod)ev.key.keysym.mod, 0); break;
-
Guys, give a try to the
lr-scummvm
libretro-based core for ScummVM I put for testing here: https://retropie.org.uk/forum/topic/19693/lr-scummvm-request-for-comments-and-testing/You can do mappings via RetroArch and customise for each game too easily with RA. Also you can use any RA-supported shader. So far it has been working nice for me, would appreciate feedback from other ScummVM players.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.