diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2011-10-16 21:01:42 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2011-10-16 21:01:42 +0000 |
commit | 2cd40fe2b68029b4e3872631ccfea41808316a14 (patch) | |
tree | e65d2a846c963441e5e1987ba540b0559eac3585 /etc | |
parent | 1cfa7840f9aabdfd296ee5486a4b3ac60b2a09a0 (diff) | |
download | FreeBSD-src-2cd40fe2b68029b4e3872631ccfea41808316a14.zip FreeBSD-src-2cd40fe2b68029b4e3872631ccfea41808316a14.tar.gz |
Add support for special keys (volume/brightness/eject) on Apple laptops with
ADB keyboards.
Submitted by: Justin Hibbits <jrh29 at alumni dot cwru dot edu>
MFC after: 9.0-RELEASE
Diffstat (limited to 'etc')
-rw-r--r-- | etc/devd/Makefile | 10 | ||||
-rw-r--r-- | etc/devd/apple.conf | 46 |
2 files changed, 55 insertions, 1 deletions
diff --git a/etc/devd/Makefile b/etc/devd/Makefile index 8d7246a..433436b 100644 --- a/etc/devd/Makefile +++ b/etc/devd/Makefile @@ -1,6 +1,14 @@ # $FreeBSD$ -FILES= asus.conf uath.conf usb.conf +FILES= uath.conf usb.conf + +.if ${MACHINE} == "powerpc" +FILES+= apple.conf +.endif + +.if ${MACHINE} == "amd64" || ${MACHINE} == "i386" +FILES+= asus.conf +.endif NO_OBJ= FILESDIR= /etc/devd diff --git a/etc/devd/apple.conf b/etc/devd/apple.conf new file mode 100644 index 0000000..a57a8e0 --- /dev/null +++ b/etc/devd/apple.conf @@ -0,0 +1,46 @@ +# $FreeBSD$ +# +# PowerPC Apple specific devd events + +# Keyboard power key +notify 0 { + match "system" "PMU"; + match "subsystem" "Button"; + match "notify" "0x0"; + action "shutdown -p now"; +}; + + +# The next blocks enable volume hotkeys that can be found on Apple laptops +notify 0 { + match "system" "PMU"; + match "subsystem" "keys"; + match "type" "mute"; + action "mixer 0"; +}; + +notify 0 { + match "system" "PMU"; + match "subsystem" "keys"; + match "type" "volume"; + match "notify" "down"; + action "mixer vol -10"; +}; + +notify 0 { + match "system" "PMU"; + match "subsystem" "keys"; + match "type" "volume"; + match "notify" "up"; + action "mixer vol +10"; +}; + +# Eject key +notify 0 { + match "system" "PMU"; + match "subsystem" "keys"; + match "type" "eject"; + action "camcontrol eject cd0"; +}; + + |