Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A lightweight hotkey daemon

Octocat-spinner-32 udev update udev rules (SYSFS->ATTRS) March 08, 2011
Octocat-spinner-32 .gitignore
Octocat-spinner-32 AUTHORS update documentation October 23, 2010
Octocat-spinner-32 COPYING
Octocat-spinner-32 Makefile rework config file parser December 07, 2010
Octocat-spinner-32 README update documentation October 27, 2010
Octocat-spinner-32 cmdsocket.c clarify licence information (GPLv3 or later) May 10, 2011
Octocat-spinner-32 cmdsocket.h clarify licence information (GPLv3 or later) May 10, 2011
Octocat-spinner-32 command.h clarify licence information (GPLv3 or later) May 10, 2011
Octocat-spinner-32 devices.c clarify licence information (GPLv3 or later) May 10, 2011
Octocat-spinner-32 devices.h clarify licence information (GPLv3 or later) May 10, 2011
Octocat-spinner-32 devtag.h clarify licence information (GPLv3 or later) May 10, 2011
Octocat-spinner-32 eventnames.c
Octocat-spinner-32 eventnames.h clarify licence information (GPLv3 or later) May 10, 2011
Octocat-spinner-32 eventtable.h clarify licence information (GPLv3 or later) May 10, 2011
Octocat-spinner-32 ignore.c
Octocat-spinner-32 ignore.h clarify licence information (GPLv3 or later) May 10, 2011
Octocat-spinner-32 keystate.c
Octocat-spinner-32 keystate.h clarify licence information (GPLv3 or later) May 10, 2011
Octocat-spinner-32 obey.c clarify licence information (GPLv3 or later) May 10, 2011
Octocat-spinner-32 obey.h clarify licence information (GPLv3 or later) May 10, 2011
Octocat-spinner-32 th-cmd.c clarify licence information (GPLv3 or later) May 10, 2011
Octocat-spinner-32 th-cmd.pod add documentaion for device tags December 08, 2010
Octocat-spinner-32 thd.c clarify licence information (GPLv3 or later) May 10, 2011
Octocat-spinner-32 thd.h clarify licence information (GPLv3 or later) May 10, 2011
Octocat-spinner-32 thd.pod add documentaion for device tags December 08, 2010
Octocat-spinner-32 trigger.c Set TH_DEVICE environment variable so that triggers know the origin o… May 24, 2011
Octocat-spinner-32 trigger.h clarify licence information (GPLv3 or later) May 10, 2011
Octocat-spinner-32 triggerhappy.conf.examples pass device struct to run_triggers function December 08, 2010
Octocat-spinner-32 triggerparser.c remove leading whitespaces from command lines February 14, 2012
Octocat-spinner-32 triggerparser.h
Octocat-spinner-32 uinput.c
Octocat-spinner-32 uinput.h
Octocat-spinner-32 version.inc increment version number to 0.3.4 March 24, 2011
README
Triggerhappy
- a lightweight hotkey daemon -

by Stefan Tomanek <stefan.tomanek+th@wertarbyte.de>
http://github.com/wertarbyte/triggerhappy/

Triggerhappy is a hotkey daemon developed with small and embedded systems in
mind, e.g. linux based routers. It attaches to the input device files and
interprets the event data received and executes scripts configured in its
configuration.

Examples:

Dump all events received through two device files:

	thd --dump /dev/input/event0 /dev/input/event1

Event handlers can be defined in configuration files (specified by --triggers).
If a directory is specified, all configuration files within matching the
pattern *.conf are loaded. The files use the following format:

<event name>	<event value>	<command line>

e.g.

KEY_VOLUMEUP	1		/usr/bin/amixer set Master 5%+
KEY_VOLUMEUP	2		/usr/bin/amixer set Master 5%+
KEY_VOLUMEDOWN	1		/usr/bin/amixer set Master 5%-
KEY_VOLUMEDOWN	2		/usr/bin/amixer set Master 5%-

A value of 1 corresponds to pressing a key, while 2 is generated by
holding it; releasing it yields a value of 0.

It is also possible to append up to 5 modifiers to each event definition by
appending their names to the event name:

KEY_VOLUMEUP+KEY_LEFTSHIFT	1	/usr/bin/amixer set Master 15%+

Devices can be added dynamically by specifying a command socket:

thd --socket /var/run/triggerhappy.socket --triggers /etc/triggerhappy.d/

The program th-cmd is used to add new devices to the daemon:

th-cmd /var/run/triggerhappy.socket add /dev/input/event0
th-cmd /var/run/triggerhappy.socket remove /dev/input/event3

An example udev script is also included to facilitate this hotplug
support - for this use, th-cmd can handle the parameter "udev" to
deduce the device name and action from the udev environment.

For more information, consult the manual pages of "thd" and "th-cmd".
Something went wrong with that request. Please try again.