RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    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

    Getting emulators to see controller input as a keyboard?

    Scheduled Pinned Locked Moved Help and Support
    2 Posts 2 Posters 885 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • LoxleyL
      Loxley
      last edited by

      Hello,
      Over the last few months I've been casually putting together some portable raspberry-pi emulator consoles. The most recent one I've put together is using a pi-zero and built within an original gameboy case. I purchased a gameboy controller pcb (this one http://store.kitsch-bent.com/product/common-ground-dmg-button-pcb) so that i could use the original buttons and such(A, B, START, SELECT, UP, DOWN, LEFT, RIGHT). Using Adafruits RetroGame I was FINALLY able to get emulation-station to work with the controls! However I can only navigate the menus of emulation station... as soon as i launch a game the emulator will not recognize my button inputs. I've mapped the gameboy buttons to keyboard inputs (the same ones that an actual keyboard uses if plugged in to control) but for some reason the emulators still wont recognize my gameboy pcb inputs!

      any ideas?
      thanks!

      mediamogulM 1 Reply Last reply Reply Quote 0
      • mediamogulM
        mediamogul Global Moderator @Loxley
        last edited by mediamogul

        @Loxley

        You can map your controller pcb to a virtual keyboad device using the built-in xboxdrv.

        Keyboard Emulation

        The following configuration will cause xboxdrv to emulate a keyboard, which can be useful for games that are played with keyboard, like Flash games or games that don't support a joystick. Since different games use different keyboard keys you might have to adjust the keybindings to fit the game:

        $ xboxdrv
        --ui-clear
        --ui-buttonmap a=XK_a,b=XK_b,x=XK_x,y=XK_y
        --ui-buttonmap dl=XK_Left,dr=XK_Right,du=XK_Up,dd=XK_Down

        Taken from:
        http://pingus.seul.org/~grumbel/xboxdrv/xboxdrv.html

        There is also "Linux Joystick Mapper" that is very similar and a good choice as well. It's not included with RetroPie, so you'll have to make and install it.

        https://sourceforge.net/projects/linuxjoymap/

        RetroPie v4.5 • RPi3 Model B • 5.1V 2.5A PSU • 16GB SanDisk microSD • 512GB External Drive

        1 Reply Last reply Reply Quote 0
        • First post
          Last post

        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.