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

    Keyboard as gamepad

    Scheduled Pinned Locked Moved Help and Support
    gamepadkeyboardcontroller
    2 Posts 2 Posters 3.1k 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.
    • R
      rmiller6
      last edited by

      I have a Logitech F310 controller and a USB keyboard. I'd like to use one of them as player 1 and the other as player 2, but in game they both control player 1. I've searched the forums (and read the wiki), Google and YouTube and couldn't find the answer. How can I use a controller and keyboard as two different players in a game?

      Setup:
      Raspberry Pi 3
      this power supply
      RetroPie Version 4.1
      Built from SD image on RetroPie website

      Thanks for any and all help.

      meleuM 1 Reply Last reply Reply Quote 0
      • meleuM
        meleu @rmiller6
        last edited by meleu

        @rmiller6 If the scenario is exactly what you described and what you want is
        player1 = keyboard
        player2 = joystick (the only one you have plugged)

        The only thing you need is edit /opt/retropie/configs/all/retroarch.cfg and look for the lines with input_player1_device_index (same for player2), remove the comments and do the following:

        input_player1_joypad_index = 20
        input_player2_joypad_index = 0
        

        The index 20 is a high and inexistent joystick (who has 21 joysticks connected?!) and it makes the player1 unplayable via joystick, only the keyboard controls it.
        The index 0 for the player2 is the first joystick connected.

        This isn't the only way to achieve what you want, but I can assure it works. I've just tested here before posting.

        • Useful topics
        • joystick-selection tool
        • rpie-art tool
        • achievements I made
        1 Reply Last reply Reply Quote 3
        • 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.