Provided by: xwiimote_0.3+20120630-5+fakesync_amd64
xwiikeymap - Remap Wii Remote buttons to other keys
xwiikeymap [-d|--daemon] [-u|--uinput /dev/uinput] [-n|--name XWiimote Keyboard ] [-L|--left <val>] ... [-T|--two <val>]
The xwiikeymap tool is a low level button mapping application which can be used to remap the buttons of connected Wii Remotes to other keys. The application will run as a daemon and wait for connecting Wii Remotes. If a Wii Remote is detected, it will create a new input device via uinput (the kernel uinput module must be loaded). If a button is pressed on the device, the daemon will emit the mapped key on the fake input device. An application that uses the new faked input device will therefore only get the new mapping and not the raw keycodes. When starting the daemon, you can pass the mapping as command line arguments. You can find the available keys in /usr/include/linux/input.h with the KEY_* prefix. You need the decimal value of the constants and then you can pass it to the daemon. For instance to remap the HOME button of the Wii Remote to KEY_F1 59 you would pass --home 59 as argument. See below for more information on arguments. This key-mapping works on a very low-level. It works on the kernel<->user-space layer and you won't find all keys you want inside /usr/include/linux/input.h. For instance there is no KEY_PLUS as this key is not available on standard American keyboards. They use SHIFT+KEY_MINUS. You must also take into account, that the X-Server will put a keyboard- layout on top of your mapping. So if you map a button to KEY_Z but the xserver puts an European layout on the keyboard, this might become KEY_Y instead.
-d, --daemon Start application as daemon, that is, fork into background. -u, --uinput device-path Path to the uinput device. This is used to create new user-space controlled input devices. By default this is "/dev/uinput". -n, --name device-name Specify the device name that will be used for the new fake input device that is created with uinput. By default this is "XWiimote Keyboard". Mappings To remap buttons to other keys you can use the following options. All options take as argument a decimal value which will be the new value of the key. If it is 0, the key is disabled and never emitted. You can find the key-constants in /usr/include/linux/input.h -L, --left val Map the left button to the new value. By default this is KEY_LEFT. -R, --right val Map the right button to the new value. By default this is KEY_RIGHT. -U, --up val Map the up button to the new value. By default this is KEY_UP. -D, --down val Map the down button to the new value. By default this is KEY_DOWN. -A, --a val Map the A button to the new value. By default this is KEY_ENTER. -B, --b val Map the B button to the new value. By default this is KEY_SPACE. -P, --plus val Map the plus button to the new value. By default this is KEY_VOLUMEUP. -M, --minus val Map the minus button to the new value. By default this is KEY_VOLUMEDOWN. -H, --home val Map the home button to the new value. By default this is KEY_ESC. -O, --one val Map the 1 button to the new value. By default this is KEY_1. -T, --two val Map the 2 button to the new value. By default this is KEY_2.
$ xwiikeymap -d --home 59 --one 0 --two 0 This will keep the standard keymap but map the HOME-button to KEY_F1 and disable the ONE and TWO buttons. It will run as daemon in the background.
This tool works on a very low level and may not be suitable for your needs. It is recommended to use X11 mappings instead. See the other tools of the xwiimote suite for better mappings.
David Herrmann <email@example.com> The XWiimote Project: http://github.com/dvdhrm/xwiimote