cmdpad 
-------
 * version 0.0.2 - Copyright (C) 2002 Alessandro Fausto

Contents
--------

 1. Disclaimer and license
 2. What is cmdpad?
 3. System requirements
 4. Installation
 5. Contacting the author
 6. Bugs, limitations and the future
 7. Files
 8. Configuration file tokens
 9. To do
 10. Revision history

1. Disclaimer and license
-------------------------

 Read doc/COPYING file.

2. What is cmdpad?
------------------

 cmdpad - execute commands when a key is pressed, released or hold down.
 Should be started from /etc/rc or /etc/rc.local. To run it as deamon you need 
 to start it with '&'. All logs are printed to standard out and standard error
 (to write the log to disk use cmdpad > /var/log/cmdpad).
 Cmdpad searches for /etc/cmdpad.conf and load the key bindings. Then wait for
 key event and check each command to see if it should be run. The cexecuting 
 commands, any output is redirected to /dev/null and the program is started 
 with owner priviledge.

 command line parameters :

  --device <device>    : Use event <device>
  --quiet              : Do not print info
  --verbose            : Print more info
  --debug              : Print Debug Info
  --copying            : Print copying banner and exit
  --version            : Print version banner and exit
  --help               : Print command line parameters help

3. System requirements
----------------------

 One of this hardware : joystick, joypad, USB mouse, USB keyboard. 

 This program is born because i need a BIG number of button inputs and a USB 
 keyboard is the cheapest input device for a computer (101 different buttons
 with only 8 euro) and is simple to hack! Homebuild input device attached to 
 i2c, midi, joystick, serial, parallel or i2c bus require more money !

4. Installation
---------------

 - execute 
	make install

 - modify your rc.modules in order to load required modules.
   To do this read :
 
	README.usbkeyboard   # for USB keyboard
   	README.usbmouse      # for usb mouse
	README.joydev        # for joystick device
        README.evdev         # event device

 - edit the /etc/cmdpad.conf file (view CONFIG section)

 - add cmdpad to /etc/rc.d/rc.local

5. Contacting the author
------------------------

 email:        fareale@cmdpad.sourceforge.net
 mailinglist:  cmdpad-announce@cmdpad.sourceforge.net
               cmdpad-user@cmdpad.sourceforge.net
               cmdpad-devel@cmdpad.sourceforge.net
 www:          http://cmdpad.sourceforge.net

6. Bugs, limitations and the future
-----------------------------------

If you should discover a problem, please do not esitate to contact me at

 For bugs: 
  fareale@cmdpad.sourceforge.net with subject: "BUGS"

   "useful informations" includes at least:
    - cmdpad version
    - usb and keyboard type (dmesg)
    - kernel version
    - hotplug version
    - if program prints errors, include these too (cut+paste)
    - don't forget a description of your problem :-)

   If you are _really_sure_ some information is'nt important for your
   problem, you can skip it.  But if in doubt, better include it...

 For patches/changes: 
  fareale@cmdpad.sourceforge.net with subject: "PATCH"

   * Please add a comment what is changed and and why you changed it.
   * Please send unified diffs ("diff -u") against the latest version.
   * Complete patches have better chances to go in.  Quick+dirty hacks
     which need cleanups and lack documentation updates are less likely
     to go in simply because I need more time to deal with them.

 Read the TODO section for currently planned features.

7. Files
--------

 /etc/cmdpad.conf          : configuration file (next paragraph)
 /usr/local/cmdpad/cmdpad  : main program
 /usr/local/cmdpad/*.sh    : scripts
 /usr/local/cmdpad/README* : user documentations

8. Configuration file tokens
----------------------------

 TOKEN: device= <device>

  	select event device

 	EXAMPLE : device= /dev/input/event0

 TOKEN: log= verbose     

	print more info

 TOKEN: log= debug

	print debug info

 TOKEN: log= none

	Quiet

 TOKEN: command= <key code>, <event mask>, <command>

  	<key code>   decimal code of key
	<event mask> is a string with P for press, R for release, H for hold
	<command>    WARNING: is executed with the root permission

	WARNING: If some key event have more than 1 command only 
	         the first is executed.
	WARNING: The command is executed with priviledge use :
	         su <user> ; <command>
		 switch to user <userd> and execute the command.

9. To do
--------
 
 test for commands with the same key event.

10. Revision history
--------------------

 v 0.0.3
  + If the last key event match a command the Num lock led is lit.
  + leds blink and goes off when the program is terminated.

 v 0.0.2
  + Stable - First public release

