DS2Key is a snazzy little homebrew app which allows one to use the DS as a wifi controller. It works by running an app on the DS which transmits DS key presses to a server on a PC, which is then responsible for converting the received events into emulated key presses.

Now, the DS2Key developers have created a server for the Windows operating system, but since I’m a Linux guy, I thought a Linux server would be nice, and that’s what we have here! The server works by using the XTEST extension to send key press events to the X server, which are then interpreted by the emulator/game/what-have-you.

Downloading and Compiling

First, download xds2key.c. Then compile as follows:

gcc xds2key.c -o xds2key -lX11 -lXtst

Note, you may also need to include ‘-L/usr/X11R6/lib’ or something similar.

Running

xds2key works differently from the standard server. The Windows server listens for an init request that’s broadcast by the DS, and then responds. However, this only works if the DS is on the same subnet as the PC to be used. Unfortunately, for people like me who have their WAN hidden behind a firewall, this doesn’t work so well. So, to get around this, I implemented xds2key such that it proactively sends an init response to the DS’s IP, at which point the DS will begin speaking to xds2key as usual.

So, to run xds2key, follow these steps:

  1. Fire up DS2Key on your DS in the usual fashion.
  2. Run ‘xds2key -i '

Of course, replace with the IP address you selected when configuring DS2Key on your DS. If you selected a non-standard port, you'll need to use the -p flag to pass the port number to xds2key, as well.

Arguments

The following arguments are recognized:

  • -i - IP address of the DS.
  • -p - Port number to use (default is 9501).

Key Mappings

The default keymap translates the DS direction keys to direction pad keys, the buttons to their corresponding letters, Start to Enter, and Select to BackSpace.

Incidentally, none of the touch screen stuff is translated.