Keyboard as gamepad
-
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 websiteThanks for any and all help.
-
@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 withinput_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 index0
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.
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.