Page 1 of 1

Game Controller Keyboard Mapping

Posted: 3. Jul 2014, 20:09
by CraigSchulstad
Hello,

I have just built an XP virtual machine on my current desktop to replace my old XP PC that has died. I basically use my XP system to play 16-bit games. One of the games (an "Asteriods" type game) uses either a joystick or keyboard to control the movement of a "spaceship". When I play the game using the keyboard controls in the virtualbox machine (left arrow, right arrow, space bar, and so forth), it works fine. When I try to use my "Logictech Attack" game controller straight away, there is no response. In the past on my current PC I have used a utility called "JoytoKey.exe" to map that game controller's movements and buttons to corresponding keystrokes with success (e.g. moving the joystick handle to the left replicates pressing the "left arrow" key) for use with web based games that use keyboard keystrokes. When I set up the JoytoKey.exe mapping within the XP virtual machine the only mapping setting that works is for button #1 (which replicates pressing the space bar to fire a "bullet"). None of the other settings seem to register. I've used the "right control" key to try toggling the keyboard capture on and off, but that does not seem to help.

I've uploaded an image with the game controller mappings. And, I am using version 4.3.12.

Any enlightenment on how to set up the keyboard and/or the game controller would be appreciated.

Regards,

Craig Schulstad

Re: Game Controller Keyboard Mapping

Posted: 4. Jul 2014, 00:19
by socratis
I happen to have a Logitech Attack 3 joystick which I just tried with an XP VM and JoyToKey 5.6 (that's the only version I could find) and it works as someone would expect. No problems at all. So here are some troubleshooting steps:
  • Is your joystick captured by your XP guest? Check in the Control Panel, Game Controllers.
  • Is your joystick calibrated?
  • How about your JoyToKey configuration?
  • Check the JoyToKey.log file in the directory where JoyToKey is installed for any error and/or diagnostics messages.
For your reference, here is the "Profile 1.cfg" file showing a setup that is similar to what you've posted in the picture. Note that this file starts with "FileVersion=56", which may or may not be suitable for your case.

Code: Select all

[General]
FileVersion=56
NumberOfJoysticks=1
NumberOfButtons=32
DisplayMode=2
UseDiagonalInput=0
UsePOV8Way=0
Threshold=20
Threshold2=20
KeySendMode=0
SoundFile=

[Joystick 1]
Axis1n=1, 25:00:00:00, 0.000, 0, 0
Axis1p=1, 27:00:00:00, 0.000, 0, 0
Axis2n=1, 26:00:00:00, 0.000, 0, 0
Axis2p=1, 28:00:00:00, 0.000, 0, 0
Button01=1, 20:00:00:00, 0.000, 0, 0
Button02=1, 10:00:00:00, 0.000, 0, 0

Re: Game Controller Keyboard Mapping

Posted: 12. Jul 2014, 21:58
by CraigSchulstad
Dear Socratis,

Thanks for the input. Actually, I found a key mapping combination that did work betweeen the game and the JoytoKey utility. Along with what I will call the normal keyboard keys, the keyboard mapping for the game allows the use of function keys (F1 - F10). When I changed the mapping of the game to map the functions (turn right, turn left, fire, and so forth) to the function keys (e.g. F1 was for turning left) and did the same mapping of my Logictech joystick to those keys the game worked perfectly. So the bottom line is I now can use my joystick with the game. Thanks again for your input. I think this issue can be closed.

Regards,

Craig