The author has not found any simple programs that listen on a device and
run commands based on the values received. keyboard-daemon binds to a device (for example, a remote control) and listens for button presses. These are then mapped to programs that are executed. WWW: http://www.bayofrum.net/cgi-bin/fossil/keyboard-daemon/
This commit is contained in:
parent
1452785f16
commit
e75352d319
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=313344
5 changed files with 88 additions and 0 deletions
|
@ -429,6 +429,7 @@
|
|||
SUBDIR += kdf
|
||||
SUBDIR += kdirstat
|
||||
SUBDIR += keep
|
||||
SUBDIR += keyboard-daemon
|
||||
SUBDIR += kfloppy
|
||||
SUBDIR += kgrubeditor
|
||||
SUBDIR += kgtk
|
||||
|
|
33
sysutils/keyboard-daemon/Makefile
Normal file
33
sysutils/keyboard-daemon/Makefile
Normal file
|
@ -0,0 +1,33 @@
|
|||
# $FreeBSD$
|
||||
|
||||
PORTNAME= keyboard-daemon
|
||||
PORTVERSION= 0.5
|
||||
CATEGORIES= sysutils
|
||||
MASTER_SITES= http://www.bayofrum.net/dist/${PORTNAME}/
|
||||
|
||||
MAINTAINER= crees@FreeBSD.org
|
||||
COMMENT= Listens on a keyboard device and executes commands on keypresses
|
||||
|
||||
BUILD_DEPENDS= ${LOCALBASE}/lib/libcfu.a:${PORTSDIR}/devel/libcfu
|
||||
|
||||
USE_BZIP2= yes
|
||||
|
||||
USE_RC_SUBR= ${PORTNAME:S/-/_/}
|
||||
PLIST_FILES= bin/${PORTNAME}
|
||||
PORTEXAMPLES= *
|
||||
MAN1= ${PORTNAME}.1
|
||||
MANCOMPRESSED= yes
|
||||
|
||||
.include <bsd.port.options.mk>
|
||||
|
||||
do-install:
|
||||
${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin/
|
||||
${INSTALL_MAN} ${WRKSRC}/${PORTNAME}.1.gz ${MAN1PREFIX}/man/man1/
|
||||
.if ${PORT_OPTIONS:MEXAMPLES}
|
||||
${MKDIR} ${EXAMPLESDIR}
|
||||
for f in ${WRKSRC}/examples/*; do \
|
||||
${INSTALL_DATA} $$f ${EXAMPLESDIR}; \
|
||||
done
|
||||
.endif
|
||||
|
||||
.include <bsd.port.mk>
|
2
sysutils/keyboard-daemon/distinfo
Normal file
2
sysutils/keyboard-daemon/distinfo
Normal file
|
@ -0,0 +1,2 @@
|
|||
SHA256 (keyboard-daemon-0.5.tar.bz2) = 28f97ba20105953d6564b203704ffdf1f905b74567580309c3eee6cf9d7ab63b
|
||||
SIZE (keyboard-daemon-0.5.tar.bz2) = 4280
|
44
sysutils/keyboard-daemon/files/keyboard_daemon.in
Normal file
44
sysutils/keyboard-daemon/files/keyboard_daemon.in
Normal file
|
@ -0,0 +1,44 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
# PROVIDE: keyboard_daemon
|
||||
# REQUIRE: LOGIN
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
# Add the following lines to /etc/rc.conf to enable this service:
|
||||
#
|
||||
# keyboard_daemon_enable: Set to no by default; set to yes to enable it.
|
||||
# keyboard_daemon_device: Set to the name of your keyboard device, such
|
||||
# as /dev/ukbd0
|
||||
# CARE-- this will disconnect your keyboard from
|
||||
# the kbdmux, do not use on your only keyboard!
|
||||
#
|
||||
# Optional:
|
||||
#
|
||||
# keyboard_daemon_conf: Defaults to %%PREFIX%%/etc/keyboard-daemon.conf
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=keyboard_daemon
|
||||
rcvar=keyboard_daemon_enable
|
||||
|
||||
load_rc_config keyboard_daemon
|
||||
|
||||
: ${keyboard_daemon_enable:=no}
|
||||
|
||||
pidfile=/var/run/keyboard-daemon.pid
|
||||
required_files=${keyboard_daemon_conf}
|
||||
command=%%PREFIX%%/bin/keyboard-daemon
|
||||
command_args="-d -p $pidfile ${keyboard_daemon_conf+-f keyboard_daemon_conf} /dev/ukbd0"
|
||||
|
||||
start_precmd=keyboard_daemon_prestart
|
||||
stop_postcmd="kbdcontrol -a ${keyboard_daemon_device} < /dev/console"
|
||||
|
||||
keyboard_daemon_prestart()
|
||||
{
|
||||
: ${keyboard_daemon_device:?keyboard_daemon_device must be set in rc.conf}
|
||||
kbdcontrol -A ${keyboard_daemon_device} < /dev/console
|
||||
}
|
||||
|
||||
run_rc_command $1
|
8
sysutils/keyboard-daemon/pkg-descr
Normal file
8
sysutils/keyboard-daemon/pkg-descr
Normal file
|
@ -0,0 +1,8 @@
|
|||
The author has not found any simple programs that listen on a device and
|
||||
run commands based on the values received.
|
||||
|
||||
keyboard-daemon binds to a device (for example, a remote control) and
|
||||
listens for button presses. These are then mapped to programs that are
|
||||
executed.
|
||||
|
||||
WWW: http://www.bayofrum.net/cgi-bin/fossil/keyboard-daemon/
|
Loading…
Reference in a new issue