Open BlackDog6469 opened 5 years ago
I've assigned spacebar to R3 in #68 which would allow you to remap it to any other button easily.
Unfortunately I can't find any kind of interface for providing a remappable keyboard interface in the Libretro API? I don't think the request of generically being able to assign custom inputs to work like keyboard is something RetroArch has a way to do at this point. (If I'm wrong about this, please point me at a core that does it that I could use as an example.)
If something is assigned to a controller button, you can rearrange the button assignment in Quick Menu > Controls. If you want to remap controller buttons to keyboard or other controllers, you can do that in Settings > Input. Retroarch doesn't have a "keyboard" or "mouse" port remapping exposed to the user, as far as I can tell, unfortunately.
So... things can easily be reassigned in the menus as long as they have a default assignment to a button on a controller, but we run out of available buttons pretty quick. I guess the question is how many more special keys could benefit from a controller mapping?
.
Maybe one idea would be: map L3, R3, and the 4 right stick directions to (nothing), Space, and the 4 cursor keys by default, and then in core options provide 6 menus to let you reassign each of those to one of the 100 or so Atari ST keys? That would get you 6 reassignable buttons for 6 keys, and you could make per-game overrides for this.
Wouldn't be quite enough to play Star Raiders without using the virtual keyboard, but probably could accommodate a lot of stuff?
(Edit: it seems that Amiga P-UAE and C64 VICE cores do something kinda like this, so maybe it's a reasonable idea...)
on the zx81 core we can remap any keyboard on any gamepad, it's so excellent for this computer that never have any gamepad. maybe you can try to read how they do this ?
That one seems to use the same approach as I mentioned, i.e. use the core options to let you assign a keypress to each gamepad button.
I guess ideally we'd do it for all 24 retropad inputs, allowing the function of each to be reassigned in the Core Options to be mapped to various functions and/or a keypress. This would also make it possible to include things like the STE extended joystick interface (only needed for a couple of games) among the other functions available for remapping, and maybe other useful emulation functions too.
This would need a complete rewrite of the input system currently in place in hatari-mapper.c, so that arbitrary retropad inputs can hook up to arbitrary pipes. But at least it would be straightforward to code. Not a task I want to pursue at the moment, but it seems like a sensible thing to do. (I'll keep it in mind for later maintenance.)
If only RetroArch had in the Core Controls menu a way to reassign keyboard and mouse inputs, this kind of work-around would be totally unnecessary. :(
For now, R3 is space key in #68 and can be moved to any other button in the Core Controls menu.
Agree with you @bbbradsmith if you can do it later, it will make this emulator really better to use :) Thanks
Should be fixed with #68
'Vanilla' Hatari maps the space bar to joystick button 2 by default - this feature allows the skipping of various in-game menus and allows some keyboard-only games (where only directional controls and space bar are used) to be played with a joystick.
At present, there is no allowed mapping in the libretro port for the space bar, which reduces the functionality of the emulator.
More generally, allowing the user to specify custom maps between joystick buttons and the keyboard would be desirable, particularly for users running 'arcade-style' retropie implementations where they may not actually have a keyboard present.