Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

  • Hi all,

    I have searched the forum but can't find any info on this so I hope someone may be able to help.

    The default mappings in lr-fuse are as follows: -

    Buttons A, X and Y are mapped to the joystick's fire button, and button B is mapped to the UP directional button.
    Buttons L1 and R1 are mapped to RETURN and SPACE, respectively.
    The SELECT button brings up the embedded, on-screen keyboard.

    However, is it possible to map a keyboard command to the Retropad?

    For example 1942 uses the "1" key, so is it possible to map that to the Retropad?

    I have worked out how to remap the fire button, enter and space, but not other keyboard keys.

    Thanks


  • I already tried something like that but RetroArch doesn't seem to support keyboard input maped to controller buttons.

    I guess you know about the hotkey function... You could add some new hotkeys to the hotkey config file and asign these to controller buttons in the RetroArch overlay. I don't know if this works cause I never tested this. So you could try that
    The hotkey config is located here (if I remeber that correctly):

    ~/RetroPie-Setup/scriptmodules/supplementary/hotkey.sh

  • Global Moderator

    @DarkWolf

    RetroArch doesn't seem to support keyboard input maped to controller buttons.

    It supports keyboard mapping. Although, I can't remember if you have to add the entries manually. A complete two player example from mine is:

    input_player1_a = "a"
    input_player1_b = "b"
    input_player1_y = "y"
    input_player1_x = "x"
    input_player1_start = "t"
    input_player1_select = "e"
    input_player1_l = "l"
    input_player1_r = "r"
    input_player1_left = "left"
    input_player1_right = "right"
    input_player1_up = "up"
    input_player1_down = "down"
    input_player1_l2 = "d"
    input_player1_r2 = "f"
    input_player1_l3 = "c"
    input_player1_r3 = "v"
    
    input_player2_a = "k"
    input_player2_b = "m"
    input_player2_y = "o"
    input_player2_x = "n"
    input_player2_start = "num9"
    input_player2_select = "num0"
    input_player2_l = "p"
    input_player2_r = "q"
    input_player2_left = "g"
    input_player2_right = "h"
    input_player2_up = "i"
    input_player2_down = "j"
    input_player2_l2 = "s"
    input_player2_r2 = "u"
    input_player2_l3 = "w"
    input_player2_r3 = "z"
    

  • @mediamogul If I understood the post correctly he doesn't want to map the joystick buttons to keyboard keys...
    He wants to press a joystick button which then acts like a keyboard key press

  • Global Moderator

    @DarkWolf

    Ah, OK. If that's the case, then RetoArch needs to have the proper hooks to be able to remap a system's keyboard controls to the RetroPad from the core's quick menu. If it's not available there, then it's still possible with an external mapping solution such as Linux Joystick Mapper or xboxdrv.


  • @mediamogul
    I know about those options and I wanted to mention them, but I had some terrible experiences with them some time ago, so I left them out.
    But you (@tuki_cat ) could definetley check those out too

  • Global Moderator

    @DarkWolf

    I had some terrible experiences with them some time ago

    I definitely understand. They can be an uphill slog to learn, but once you know how to use them, it opens up an almost infinite amount of control.


  • @mediamogul
    Yeah I know... At some point of time I knew how to use it (kinda), but then decided to just use a keyboard instead of mapping different inputs for over 500 roms indevidualy.

  • Global Moderator

    @DarkWolf

    Most times you can map to a whole system and avoid individual ROMs, but with computer systems that never had joystick support, you could easily end up mapping that many if not more. A trusty keyboard would indeed be the best option there. It never ceases to amaze me at how many options are available on an open platform. I look at all the commercial operating systems being turned into walled gardens and it really gets frustrating by comparison.


  • @mediamogul
    As I only wanted to play ZX Spectrum games like atic atac, which are able to use a joystick, but also need a keyboard key (like z for pickung stuff up), I had to map those individualy (they were different in each game :/)

  • Global Moderator

    @DarkWolf

    I need to check out the ZX Spectrum some day. The library is massive and looks to have some great games.


  • @mediamogul Most of them are really awesome (even though I'am 17, I really like such games)


  • Thanks for all the suggestions, I have some time later so I will see what works.

    @DarkWolf - you should definitely check out the Spectrum, there are so many fantastic games


  • @tuki_cat I already have 140 spectrum games installed :D
    Just using wireless keyboard instead of controller


  • Sorry that was supposed to @mediamogul!

  • Global Moderator

    @tuki_cat

    I look forward to checking it out. It's got to be the most popular retro system that I have no experience with. It was never really introduced over here in the States, but I've been reading Retro Gamer magazine for a few years now and I'm always impressed with the titles I read about there.


  • @tuki_cat For ZX Spectrum games that require extra keys to be mapped to a joystick, I use ZEsarUX which can be installed from the Optional Packages menu in the RetroPie Setup Script.

    To map the extra key for 1942 in ZEsarUX, you would create a text file in the roms folder called 1942.tap.config, assuming the tape name is 1942.tap.

    Next add the line below in the config file to map button 15, for instance, to the keystroke 1:

    --joystickkeybt 15 '1'

    I have written a tutorial how to create config file for these extra mappings here using Chuckie Egg, which doesn't support the Kempston joystick, and Head Over Heels, which uses the keys 'z' and 's' in addition to the Kempston, as examples.

    It's worth checking the other tutorial for the default mappings in ZEsarUX.


  • @dudleydes I already checked that out but my games are not loading or the buttons of my controller doesn't work... hope this helps @tuki_cat more than me


  • @DarkWolf Could you give an example?


  • @dudleydes I don't really know... sry
    I tried that some time ago and failed :/
    Than I switched to a wireless keyboard, but I guess I was just stupid at some point. I will give it a try once again soon. If something doesn't work I will mesage you

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.