From 6c86628f8faa9fb06d76bfa14a0aa5dfb5553ee6 Mon Sep 17 00:00:00 2001 From: Locutus73 Date: Sat, 27 Apr 2019 12:57:37 +0200 Subject: [PATCH] Add files via upload --- README | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 README diff --git a/README b/README new file mode 100644 index 0000000..781d667 --- /dev/null +++ b/README @@ -0,0 +1,93 @@ +Copyright (C) 2007 L. Donnie Smith + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +OVERVIEW +------------------------------------------------------------------------------------------------ +wminput is an Linux event, mouse, and joystick driver for the wiimote using the uinput system. It supports assigning key/button symbols to buttons on the wiimote, nunchuk, and classic controller, and axes symbols to wiimote axes including direction pads, "analog" sticks, and "analog" shoulder buttons. Furthermore, it provides a plugin interface through which more advanced functionality can be implemented, such as accelerometer and ir calculations. Plugins can provide button-type events and axes. + +EXECUTION +------------------------------------------------------------------------------------------------ +wminput [-h] [-w] [-c config] [bdaddr] + +-h: print usage and exit +-w: on startup, wait (without timing out) until a wiimote is found +-c config: specifies the configuration file to load. "default" is the default configuration file (on install, a symlink is created to the acc_ptr configuration. The search directories are specified below in the section on configuration files, or an absolute or relative pathname may be given. +bdaddr: specifies the bluetooth device address of the wiimote. If unspecified, the environment variable WIIMOTE_BDADDR is used. If this variable does not exist, a connection is made with the first wiimote found. + + +CONFIGURATION REQUIREMENTS +------------------------------------------------------------------------------------------------ +uinput kernel support is required. joydev and evdev are required for joystick and event interfaces, respectively. See http://gentoo-wiki.com/HOWTO_Compile_a_Kernel_Manually for information on kernel compilation. + +By default, some (most? all?) udev configurations set up a uinput device file readable only by root. Using wminput as a user other than root requires udev to change the permissions on uinput. Place the following line in a file in /etc/udev/rules.d (see the documentation for your distro for the recommended file for local rules) to allow anyone on the system to use uinput: +KERNEL=="uinput", MODE="0666" +A more secure method uses the following line to allow anyone in to use wminput, and adds only the desired users to : +KERNEL=="uinput", GROUP="" +A uinput group can be created specifically for this purpose, or an existing group such as wheel can be used. + +Key symbols can be assigned to wminput button events. While standard keys are supported by X by default, non-standard key symbols, and mapping actions to those symbols, is not automatic. An excellent tutorial at http://gentoo-wiki.com/HOWTO_Use_Multimedia_Keys can help you set this up. An overview of the process described there: +1.Assign the key symbol in question to a button in a wminput configuration file. +2.Use wminput and the wiimote to generate that key symbol, using xev to find out if the key symbol is already mapped, and find the key code if it is not. +3.If the code is not mapped to the appropriate symbol, edit ~/.Xmodmap, and use xmodmap to map them. (A copy of my ~/.Xmodmap is included in cwiid/doc) +4.Use xbindkeys or a window manager-specific utility to map the key symbols to specific actions. + +Wiimote buttons can be mapped to modifier keys (control, shift, alt, etc.) with the command xmodmap command 'add [mod] = [keysym]', where keysym is the key symbol mapped in the process described above, and mod is one of the modifier names listed by 'xmodmap -pm' (mod1 = alt). + +CONFIGURATION FILES +------------------------------------------------------------------------------------------------ +Configuration files are installed in /usr/local/etc/cwiid/wminput. Configuration search directory order is ~/.cwiid/wminput, /usr/local/etc/cwiid/wminput. +Configuration files specify the mapping of button and key symbols to wiimote buttons, and axis symbols to wiimote axes. The grammar is as follows (words in angle brackets are to be replaced by appropriate values or strings, without the brackets): + +# + Comment + +include + Include the file specified by inc_file. + +Wiimote.