/
actkbd.conf
85 lines (62 loc) · 1.89 KB
/
actkbd.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# The keycodes on a PC are usually:
#
# Left Shift = 42
# Left Ctrl = 29
# Left Alt = 56
# Right Alt = 100
# Right Ctrl = 97
# Right Shift = 54
#
# Mute = 113
# Volume Down = 114
# Volume Up = 115
# Eject = 161
#
# The LED codes on a PC are usually:
#
# Num Lock = 0
# Caps Lock = 1
# Scroll Lock = 2
# Some simple examples
114:key::echo volume.down press
114:rep::echo volume.down repeat
114:rel::echo volume.down release
56+114:::echo left.alt+volume.down press
# Use the `mute' key as a 'function' key
113:key:ungrabbed,grab:echo keyboard grab
113:rel:grabbed,ungrab:echo keyboard ungrab
# This allows the `a' key to be binded to a command
# To use: press mute, press a, release in any order
113+30::grabbed:echo alpha
# Same thing with the `b' key
113+48::grabbed:echo beta
# Act if any of the `a'/`b'/`c' keys match
30,48,46::any:echo A/B/C
# Act if both the `alt' and `f' keys match - ignore the other keys
56+33::all:echo alt+f+...
# A real world example...
# When the `eject' key is pressed, wait for one of the `e'/`m'/`u' keys:
161::ungrabbed,grab,noexec,ignrel:
161:rel:grabbed,noexec:
# The `e' key : eject
161+18::grabbed:echo eject
161+18:rel:grabbed,noexec,ungrab,rcvrel,allrel:
# The `m' key : mount
161+50::grabbed:echo mount
161+50:rel:grabbed,noexec,ungrab,rcvrel,allrel:
# The `u' key : umount
161+22::grabbed:echo umount
161+22:rel:grabbed,noexec,ungrab,rcvrel,allrel:
# Any other key escapes this mode
161::grabbed,all,noexec:
161:rel:grabbed,all,noexec,ungrab,rcvrel,allrel:
# Produce an `a' key press and release whenever
# the `left.ctrl'+`volume.up' keys are pressed
29+115::key(30),rel(30),noexec:
# Pressing the `1' key switches on the first LED (usually the Num Lock LED)
2::ledon(0),noexec:
# Pressing the `0' key switches it off
11::ledoff(0),noexec:
# This entry is triggered by any key press or release
# that has not matched with one of the entries above
:key,rel:not:echo '*'