Game Controller Keyboard Mapping

Discussions about using Windows guests in VirtualBox.
Post Reply
CraigSchulstad
Posts: 2
Joined: 3. Jul 2014, 19:39

Game Controller Keyboard Mapping

Post 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
Attachments
JoytoKey.png
JoytoKey.png (19.35 KiB) Viewed 2203 times
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Game Controller Keyboard Mapping

Post 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
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
CraigSchulstad
Posts: 2
Joined: 3. Jul 2014, 19:39

Re: Game Controller Keyboard Mapping

Post 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
Post Reply