X.org nintendo wii remote input driver
Section \*qInputDevice\*q Identifier \*qdevname\*q Driver \*qxwiimote\*q ... Option \*qDevice\*q \*qdevpath\*q Option \*qMotionSource\*q \*qsource\*q ... Option \*qMPNormalization\*q \*qInt:Int:Int\*q Option \*qMPCalibrationFactor\*q \*qInt\*q Option \*qMPXAxis\*q \*qx\*q or \*qy\*q or \*qz\*q Option \*qMPXScale\*q \*qInt\*q ... Option \*qMapLeft\*q \*qval\*q Option \*qMapRight\*q \*qval\*q Option \*qMapUp\*q \*qval\*q Option \*qMapDown\*q \*qval\*q Option \*qMapA\*q \*qval\*q Option \*qMapB\*q \*qval\*q Option \*qMapPlus\*q \*qval\*q Option \*qMapMinus\*q \*qval\*q Option \*qMapHome\*q \*qval\*q Option \*qMapOne\*q \*qval\*q Option \*qMapTwo\*q \*qval\*q ... Option \*qXkbRules\*q \*qrules\*q Option \*qXkbModel\*q \*qmodel\*q Option \*qXkbLayout\*q \*qlayout\*q Option \*qXkbVariant\*q \*qvariant\*q Option \*qXkbOptions\*q \*qoptions\*q EndSection
xwiimote is an Xorg input driver for Nintendo Wii Remotes on Linux. It is based on the xwiimote tools and kernel driver. With this driver you can use the Wii Remote as input for any X application including games. It is highly customizable but comes with sane default values.
The Wii Remote can serve as pointer and keyboard device. The Pointer capabilities are disabled by default. The buttons are mapped to sane default keys so you can directly use the Wii Remote as input device without configuring it.
It is recommended that xwiimote devices are configured through the InputClass directive (refer to xorg.conf(5)) instead of manual per-device configuration. Devices configured in the xorg.conf(5) are not hot-plug capable so use an InputClass instead. This package comes with the default configuration installed as /etc/X11/xorg.conf.d/60-xwiimotes.conf but your distribution may have installed it into other locations. Use this default to configure your Wii Remotes.
Please refer to xorg.conf(5) for general configuration details and for options that can be used with all input drivers. This section only covers configuration details specific to this driver.
The following driver Options are supported:
This specifies the device path to the input event-device of the Wii Remote. This is most often a device in /dev/input/eventX. Do not use this option unless you want to disable device hot-plug.
The Wii Remote can be used as motion input device (like a mouse). This selects what kind of motion-emulation should be performed. source can be one of accelerometer, ir, MotionPlus or off. Default is off which means no motion-emulation is done. accelerometer means that the accelerometer is used to calculate current tilt and use this as absolute pointer input.
ir means that the IR sensor is used to detect the mouse-location. You need to place an IR emitter in front of you. The Wii Remote has a built-in camera to scan it and calculate the pointer-position from it. Only a single IR source is used by this driver. If multiple IR sources are found, the upper-left most is used.
MotionPlus means that the gyroscope of MotionPlus extensions (or Gen2.0 Devices with built-in MotionPlus) is used. You need to set MPNormalization and MPCalibrationFactor or use run-time calibration to make use of this. This does nothing if no MotionPlus is detected. With newer kernels, you can plug/replug the MotionPlus adapter during runtime and it gets detected automatically.
Option \*qMPNormalization\*q \*qOn\*q or \*qInt:Int:Int\*q
Option \*qMPCalibrationFactor\*q \*qOn\*q or \*qInt\*q
Option \*qMPXAxis\*q \*qx\*q or \*qy\*q or \*qz\*q
Option \*qMPXScale\*q \*qInt\*q
Option \*qMPYAxis\*q \*qx\*q or \*qy\*q or \*qz\*q
Option \*qMPYScale\*q \*qInt\*q
Option \*qMPZAxis\*q \*qx\*q or \*qy\*q or \*qz\*q
Option \*qMPZScale\*q \*qInt\*q
If running in MotionSource MotionPlus configuration, MPNormalization can be used to apply a constant offset to normalize MotionPlus data. Please use xwiishow or some similar tool from the xwiimote distribution to get these offsets. Set this to on to let the driver perform automatic normalization during startup.
The calibration factor is used to apply calibration values during runtime to keep the data smooth. A factor between 10 and 100 is normally used. If set to on, 50 will be used.
The Axis and Scale options for each axis define remappings and scaling in case the default mappings are not what you want. The Axis selector specifies which axis to use as source. So if you set MPXAxis to z, then whenever the driver wants to read the X-axis values, it gets the Z-axis instead. The Scale options specify a multiplier. The default is 1 (no scaling). The default for the axis-mappings are the trivial mappings. Note that the MP-motion-source only uses X and Z axis for movement calculations.
The following options specify keymaps for the buttons of a Wii Remote. The val field of the options must be one of the linux input-key/btn constants. You can find them in /usr/include/linux/input.h. They start with KEY_* or BTN_*. The option is case-insensitive so KEY_ENTER and Key_Enter are the same. Additional values are none, off, 0 or false to disable the given button or left-button, right-button or middle-button to emulate mouse-buttons instead of keyboard keys.
Specify the mapping of the LEFT button of the Wii Remote. Default is KEY_LEFT
Specify the mapping of the RIGHT button of the Wii Remote. Default is KEY_RIGHT
a Specify the mapping of the UP button of the Wii Remote. Default is KEY_UP
a Specify the mapping of the DOWN button of the Wii Remote. Default is KEY_DOWN
a Specify the mapping of the A button of the Wii Remote. Default is KEY_ENTER
a Specify the mapping of the B button of the Wii Remote. Default is KEY_SPACE
a Specify the mapping of the PLUS button of the Wii Remote. Default is KEY_VOLUMEUP
a Specify the mapping of the MINUS button of the Wii Remote. Default is KEY_VOLUMEDOWN
a Specify the mapping of the HOME button of the Wii Remote. Default is KEY_ESC
a Specify the mapping of the ONE button of the Wii Remote. Default is KEY_1
Specify the mapping of the TWO button of the Wii Remote. Default is KEY_2
The following options are standard X.org input device options which also apply to Wii Remote devices:
Option \*qXkbRules\*q \*qrules\*q
Option \*qXkbModel\*q \*qmodel\*q
Option \*qXkbLayout\*q \*qlayout\*q
Option \*qXkbVariant\*q \*qvariant\*q
Option \*qXkbOptions\*q \*qoptions\*q
These are the standard Xkb options that select the RMLVO parameters of the keyboard. See the Xkb man-pages for more information. Please be aware that keymaps are applied to all keys before they are sent to the X clients. So take that into account when configuring the other mappings of Wii Remotes.
David Herrmann <[email protected]>
The XWiimote Project: http://dvdhrm.github.io/xwiimote
The xf86-input-xwiimote Project: http://github.com/dvdhrm/xf86-input-xwiimote
xwiimote(7), xorg.conf(5), Xorg(1), X(7)