Skip to content
Blub edited this page Sep 14, 2010 · 2 revisions

In read-mode (netevent -read <event-device>) the specified event device is opened. Its capabilities are dumped to stdout in a format that can be interpreted by Write Mode, and immediately after that, all events from the device will be dumped to stdout in binary as well.
By default, the device is being grabbed, unless the -nograb option is added. In this case, no other process will recieve events from this device. This is useful if you want to Share devices over the net.

Options for read mode:

option effect
-nograb Do not grab the input device immediately
-ontoggle <command> Execute the specified shell command (using sh -c <command>) whenever device-grabbing changes state. The GRAB environment variable will be available and will be 0 if grabbing was disabled, and 1 if grabbing was enabled.
-toggler Monitor the specified file for changes. Whenver it is changed (or newly created), read its contents and activate or deactivate device grabbing. If the content interpreted as an integer is not-zero, grabbing is activated, otherwise it is deactivated.
-hotkey type:code:value <command> Whenever the currently read event equals the specified combination of type code and value (see Event types), drop the event (it will not be printed to stdout), and execute the specified command using sh -c <command>. There are 3 special commands which are directly interpreted: “@toggle”, “@toggle-on”, “@toggle-off”, which correspond to toggling, activating and deactivating device grabbing respectively.