1226449Snwhitehorn# $FreeBSD$
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
13230788Sjhibbits# PowerBook and iBook lid close.
14230788Sjhibbitsnotify 0 {
15230788Sjhibbits	match "system"		"PMU";
16230788Sjhibbits	match "subsystem"	"lid";
17230788Sjhibbits	match "type"		"close";
18230788Sjhibbits	action			"shutdown -p now";
19230788Sjhibbits};
20230788Sjhibbits
21230788Sjhibbits
22232677Sjhibbits# The next blocks enable brightness hotkeys that can be found on Apple laptops
23232677Sjhibbitsnotify 0 {
24232677Sjhibbits	match "system"		"PMU";
25232677Sjhibbits	match "subsystem"	"keys";
26232677Sjhibbits	match "type"		"brightness";
27232677Sjhibbits	match "notify"		"down";
28232677Sjhibbits	action			"sysctl dev.backlight.0.level=\
29232677Sjhibbits		$(expr `sysctl -n dev.backlight.0.level` - 10)";
30232677Sjhibbits};
31232677Sjhibbits
32232677Sjhibbitsnotify 0 {
33232677Sjhibbits	match "system"		"PMU";
34232677Sjhibbits	match "subsystem"	"keys";
35232677Sjhibbits	match "type"		"brightness";
36232677Sjhibbits	match "notify"		"up";
37232677Sjhibbits	action			"sysctl dev.backlight.0.level=\
38232677Sjhibbits		$(expr `sysctl -n dev.backlight.0.level` + 10)";
39232677Sjhibbits};
40232677Sjhibbits
41232677Sjhibbits
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