Homepage › Forums › RetroPie Project › Everything else related to the RetroPie Project › XArcade + USB keyboard
- This topic has 15 replies, 5 voices, and was last updated 10 years, 5 months ago by petrockblog.
-
AuthorPosts
-
04/25/2013 at 22:00 #1611Idris_ArslanianParticipant
Hey all, my current setup is an XArcade dual joystick paired with a USB keyboard. I’ve finally gotten the XArcade to work with EmulationStation, but am having trouble configuring it with RetroArch. I believe this has to do with the fact that I have two USB input devices (The XArcade and Keyboard) plugged into the Pi. This is being interpreted as two USB keyboards. Is there a way to, in the .cfg file, setup a second keyboard? If so, what is the syntax?
Thanks
-Idris_Arslanian
05/01/2013 at 05:36 #1659Idris_ArslanianParticipantWell, I snagged a PS2 keyboard so I could hook up the XArcade and keyboard jointly so the Pi would recognize them both as the same keyboard input. However, I am having trouble remapping the buttons in the RetroPie.cfg. I have the following in the file, but it is not recognizing the reconfigured buttons. I have no .cfg files in any of the emulator specific configuration folders:
home/pi/RetroPie/configs/all/RetroPie.cfg
# Keyboard input. Will recognize normal keypresses and special keys like “left”, “right”, and so on.
# Keyboard input, Joypad and Joyaxis will all obey the “nul” bind, which disables the bind completely,
# rather than relying on a default.
input_player1_a = “5”
input_player1_b = “c”
input_player1_y = “lshift”
input_player1_x = “z”
input_player1_start = “1”
input_player1_select = “3”
input_player1_l = “lctrl”
input_player1_r = “lalt”
input_player1_left = “4”
input_player1_right = “6”
input_player1_up = “8”
input_player1_down = “2”input_player2_a = “e”
input_player2_b = “w”
input_player2_y = “]”
input_player2_x = “6”
input_player2_start = “2”
input_player2_select = “4”
input_player2_l = “a”
input_player2_r = “s”
input_player2_left = “d”
input_player2_right = “g”
input_player2_up = “r”
input_player2_down = “f”
# input_player1_l2 =
# input_player1_r2 =
# input_player1_l3 =
# input_player1_r3 =05/06/2013 at 19:52 #1714Idris_ArslanianParticipantFYI to anyone who stumbles upon this thread. You can get most of the available keycodes from the inputcommon.c file. I got a good response here: https://github.com/Themaister/RetroArch/blob/master/input/input_common.c#L613
{ “left”, RETROK_LEFT },
{ “right”, RETROK_RIGHT },
{ “up”, RETROK_UP },
{ “down”, RETROK_DOWN },
{ “enter”, RETROK_RETURN },
{ “kp_enter”, RETROK_KP_ENTER },
{ “tab”, RETROK_TAB },
{ “insert”, RETROK_INSERT },
{ “del”, RETROK_DELETE },
{ “end”, RETROK_END },
{ “home”, RETROK_HOME },
{ “rshift”, RETROK_RSHIFT },
{ “shift”, RETROK_LSHIFT },
{ “ctrl”, RETROK_LCTRL },
{ “alt”, RETROK_LALT },
{ “space”, RETROK_SPACE },
{ “escape”, RETROK_ESCAPE },
{ “add”, RETROK_KP_PLUS },
{ “subtract”, RETROK_KP_MINUS },
{ “kp_plus”, RETROK_KP_PLUS },
{ “kp_minus”, RETROK_KP_MINUS },
{ “f1”, RETROK_F1 },
{ “f2”, RETROK_F2 },
{ “f3”, RETROK_F3 },
{ “f4”, RETROK_F4 },
{ “f5”, RETROK_F5 },
{ “f6”, RETROK_F6 },
{ “f7”, RETROK_F7 },
{ “f8”, RETROK_F8 },
{ “f9”, RETROK_F9 },
{ “f10”, RETROK_F10 },
{ “f11”, RETROK_F11 },
{ “f12”, RETROK_F12 },
{ “num0”, RETROK_0 },
{ “num1”, RETROK_1 },
{ “num2”, RETROK_2 },
{ “num3”, RETROK_3 },
{ “num4”, RETROK_4 },
{ “num5”, RETROK_5 },
{ “num6”, RETROK_6 },
{ “num7”, RETROK_7 },
{ “num8”, RETROK_8 },
{ “num9”, RETROK_9 },
{ “pageup”, RETROK_PAGEUP },
{ “pagedown”, RETROK_PAGEDOWN },
{ “keypad0”, RETROK_KP0 },
{ “keypad1”, RETROK_KP1 },
{ “keypad2”, RETROK_KP2 },
{ “keypad3”, RETROK_KP3 },
{ “keypad4”, RETROK_KP4 },
{ “keypad5”, RETROK_KP5 },
{ “keypad6”, RETROK_KP6 },
{ “keypad7”, RETROK_KP7 },
{ “keypad8”, RETROK_KP8 },
{ “keypad9”, RETROK_KP9 },
{ “period”, RETROK_PERIOD },
{ “capslock”, RETROK_CAPSLOCK },
{ “numlock”, RETROK_NUMLOCK },
{ “backspace”, RETROK_BACKSPACE },
{ “multiply”, RETROK_KP_MULTIPLY },
{ “divide”, RETROK_KP_DIVIDE },
{ “print_screen”, RETROK_PRINT },
{ “scroll_lock”, RETROK_SCROLLOCK },
{ “tilde”, RETROK_BACKQUOTE },
{ “backquote”, RETROK_BACKQUOTE },
{ “pause”, RETROK_PAUSE },
{ “nul”, RETROK_UNKNOWN },
{ NULL, RETROK_UNKNOWN },Note, you need to use the first portion (quoted).
-Idris_A
06/27/2013 at 06:13 #2267jadawanParticipantDid you ever get this figured out? I am going crazy trying to get this to work.
06/27/2013 at 15:08 #2269Idris_ArslanianParticipantYup, sure did. I’m going to need a bit more info from you though if I’m to be of help. How does your RetroPie.cfg look? How did you hook up your XArcade? How is the keyboard hooked up?
06/27/2013 at 15:25 #2270jadawanParticipantWow, thanks for getting back with me. Keyboard and XArcade are hooked up via USB. I tried just having the XArcade plugged in so it didn’t think it had two keyboards attached. Still no luck. I know the XArcade is at least working to some extent. I can use it to type in terminal and certain buttons will speed up NES and SNES emulators, and put it in slow motion. But mapping it out seems to do nothing. Here are the relevant lines in retropie.cfg
# Keyboard input. Will recognize normal keypresses and special keys like “left”, “right”, and so on.
# Keyboard input, Joypad and Joyaxis will all obey the “nul” bind, which disables the bind completely,
# rather than relying on a default.
input_player1_a = “z”
input_player1_b = “lshift”
input_player1_y = “lctl”
input_player1_x = “lalt”
input_player1_start = “keypad5”
input_player1_select = “c”
input_player1_l = “space”
input_player1_r = “x”
input_player1_left = “keypad4”
input_player1_right = “keypad6”
input_player1_up = “keypad8”
input_player1_down = “keypad2”
# input_player1_l2 =
# input_player1_r2 =
# input_player1_l3 =
# input_player1_r3 =input_player2_a = “w”
input_player2_b = “e”
input_player2_y = “a”
input_player2_x = “s”
input_player2_start = “num6”
input_player2_select = “]”
input_player2_l = “q”
input_player2_r = “[”
input_player2_left = “d”
input_player2_right = “g”
input_player2_up = “r”
input_player2_down = “f”Hope that’s enough info.
06/27/2013 at 15:32 #2271Idris_ArslanianParticipantYup, I couldn’t get it working when I plugged in a USB keyboard either. I needed to do it through the PS2 connection on the XArcade. Then it’s a matter of making your mappings match with the available keys in inputcommon.c (see above post). I had to program the XArcade stick as well because I couldn’t figure out what the mappings were for a couple of the keys (I believe “]” in particular). It just takes some fiddling. Good Luck!
06/27/2013 at 16:48 #2273jadawanParticipantAwesome! So a few of questions for clarification.
1. Do you use a PS2 keyboard plugged into the XArcade, and the XArcade is still plugged in via USB?
2. I only need to use the items in quotations, and not the, for example, ETROK_RSHIFT. Also, you still use the quotations ie. “rshift” instead of rshift in the code? So it would be: input_player1_b = “rshift”
3. When you mapped your buttons on the XArcade, did you only map them to the above list only? or did you still use buttons like “c” or “z”
4. Did you need to change any of the keyboard settings in sudo raspi-config or where defaults ok?
I can’t wait to get back home tonight and give it another whirl!
06/27/2013 at 16:54 #2274Idris_ArslanianParticipant1: Yes, exactly.
2: Yes, exactly!
3: I tried to use as many of the default buttons on the XArcade as possible.
4: Defaults were fine.06/27/2013 at 17:24 #2276Idris_ArslanianParticipant06/27/2013 at 17:46 #2278jadawanParticipantJust did.
10/09/2013 at 02:18 #2887mattycParticipantJadawon or Idris, I have an DIY x-arcade and ran into the same problem as you with not being able to use the bracket keys[ ] in the retroarch.cfg. I reprogrammed the x-arcade, but the problem is that if the unit is shut off and then turned back on, you have to press the load button twice to load the configuration.
I’d really like to be able to power the system up and play games without having to load a x-arcade configuration every time. I was wondering if you guys managed to find a better solution.
10/09/2013 at 14:29 #2890jadawanParticipantNope. Still have to press the load button twice. I just keep everything on. It’s annoying, and frustrating, but I’ve learn to live with it.
10/09/2013 at 14:31 #2891jadawanParticipant*learned
11/04/2013 at 01:13 #3074krsjuanParticipantWould one of you mind posting your .cfg? Im using the x-arcade DIY kit with a PS2 keyboard.
06/08/2014 at 21:46 #7387petrockblogKeymasterThe Xarcade Tankstick is working with RetroPie seamlessly now!
If you are more interested in this have a look at https://www.petrockblock.com/2014/06/01/xarcade2jstick/.
Have fun! -
AuthorPosts
- The forum ‘Everything else related to the RetroPie Project’ is closed to new topics and replies.