Key Scripter is a software tool that tracks keyboard and mouse events and generates synthetic key events for an X display.
The installation process of Key Scripter is simple. Extract the files to a directory of your preference and use the following commands in the extracted directory to compile the package:
./configure
make
After the successful compilation of the package, execute the following command as root to install Key Scripter:
make install
To uninstall Key Scripter, use the command:
make uninstall
In order to listen to key events, Key Scripter reads the raw data from one or more device files. Use the command 'cat /proc/bus/input/devices' to determine which device corresponds to your keyboard, mouse or keypad.
Key Scripter allows users to specify the value of the listed 'N: Name' or 'P: Phys' property instead of the actual device file name. However, it is easy to determine which device file to use by looking at the 'H: Handlers' property. For instance, 'H: Handlers=kbd event2' denotes that you can specify /dev/input/event2 as the source file for Key Scripter with the command:
key-scripter -i=/dev/input/event2
Since device files are dynamically created, they are not guaranteed to remain the same after a system reboot. Therefore, it is necessary to specify the input device by its name (using the value from the 'N: Name' property) instead of specifying the actual device file when starting Key Scripter from a script. Key Scripter will then automatically determine which device file to use to collect data from the device.
It is important to note that only the root user can read files under /dev/input/event*. This implies that Key Scripter won't run when executed by a regular user. Therefore, it is advised to adjust the access permissions of the device file to allow other users to read it. This can be done by utilizing the 'input' group, created during the installation of Key Scripter. The install script also adds the key-scripter executable to the 'input' group and enables the 'set group ID on execution' file mode on it.
After the installation of Key Scripter, execute the following command to allow anyone in the 'input' group to read the specified device file:
chown :input /dev/input/event* && chmod g+r /dev/input/event*
N.B: Ensure to replace 'event*' with the correct name of the device file. Remember to execute this command on each system start-up since device files are recreated each time the system boots. Add the above command to one of your system start-up scripts for ease of execution.
This release of Key Scripter contains several minor bug fixes and an improved example configuration. The development status of Key Scripter is now stable.
Version 1.4: N/A