apple.conf revision 232177
1226449Snwhitehorn# $FreeBSD: head/etc/devd/apple.conf 232177 2012-02-26 13:45:25Z jhibbits $ 2226449Snwhitehorn# 3226449Snwhitehorn# PowerPC Apple specific devd events 4226449Snwhitehorn 5226449Snwhitehorn# Keyboard power key 6226449Snwhitehornnotify 0 { 7226449Snwhitehorn match "system" "PMU"; 8226449Snwhitehorn match "subsystem" "Button"; 9226449Snwhitehorn action "shutdown -p now"; 10226449Snwhitehorn}; 11226449Snwhitehorn 12226449Snwhitehorn 13228277Sjhibbits# PowerBook and iBook lid close. 14228270Sjhibbitsnotify 0 { 15228270Sjhibbits match "system" "PMU"; 16228270Sjhibbits match "subsystem" "lid"; 17228270Sjhibbits match "type" "close"; 18228270Sjhibbits action "shutdown -p now"; 19228270Sjhibbits}; 20228270Sjhibbits 21228270Sjhibbits 22232177Sjhibbits# The next blocks enable brightness hotkeys that can be found on Apple laptops 23232177Sjhibbitsnotify 0 { 24232177Sjhibbits match "system" "PMU"; 25232177Sjhibbits match "subsystem" "keys"; 26232177Sjhibbits match "type" "brightness"; 27232177Sjhibbits match "notify" "down"; 28232177Sjhibbits action "sysctl dev.backlight.0.level=\ 29232177Sjhibbits $(expr `sysctl -n dev.backlight.0.level` - 10)"; 30232177Sjhibbits}; 31232177Sjhibbits 32232177Sjhibbitsnotify 0 { 33232177Sjhibbits match "system" "PMU"; 34232177Sjhibbits match "subsystem" "keys"; 35232177Sjhibbits match "type" "brightness"; 36232177Sjhibbits match "notify" "up"; 37232177Sjhibbits action "sysctl dev.backlight.0.level=\ 38232177Sjhibbits $(expr `sysctl -n dev.backlight.0.level` + 10)"; 39232177Sjhibbits}; 40232177Sjhibbits 41232177Sjhibbits 42226449Snwhitehorn# The next blocks enable volume hotkeys that can be found on Apple laptops 43226449Snwhitehornnotify 0 { 44226449Snwhitehorn match "system" "PMU"; 45226449Snwhitehorn match "subsystem" "keys"; 46226449Snwhitehorn match "type" "mute"; 47226449Snwhitehorn action "mixer 0"; 48226449Snwhitehorn}; 49226449Snwhitehorn 50226449Snwhitehornnotify 0 { 51226449Snwhitehorn match "system" "PMU"; 52226449Snwhitehorn match "subsystem" "keys"; 53226449Snwhitehorn match "type" "volume"; 54226449Snwhitehorn match "notify" "down"; 55226449Snwhitehorn action "mixer vol -10"; 56226449Snwhitehorn}; 57226449Snwhitehorn 58226449Snwhitehornnotify 0 { 59226449Snwhitehorn match "system" "PMU"; 60226449Snwhitehorn match "subsystem" "keys"; 61226449Snwhitehorn match "type" "volume"; 62226449Snwhitehorn match "notify" "up"; 63226449Snwhitehorn action "mixer vol +10"; 64226449Snwhitehorn}; 65226449Snwhitehorn 66226449Snwhitehorn# Eject key 67226449Snwhitehornnotify 0 { 68226449Snwhitehorn match "system" "PMU"; 69226449Snwhitehorn match "subsystem" "keys"; 70226449Snwhitehorn match "type" "eject"; 71226449Snwhitehorn action "camcontrol eject cd0"; 72226449Snwhitehorn}; 73226449Snwhitehorn 74226449Snwhitehorn 75