-
Notifications
You must be signed in to change notification settings - Fork 17
/
spacefn-win.ahk
121 lines (89 loc) · 2.74 KB
/
spacefn-win.ahk
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
; Note: This implementation assumes an en-US QWERTY layout.
SendMode Input
#NoEnv
#SingleInstance force
options := {delay: 150, timeout: 300, doublePress: -1, swap_backtick_escape: false, mode: "ijkl"}
loop %0% {
arg := %A_Index%
argSplit := StrSplit(arg, "=")
option := argSplit[1]
value := argSplit[2]
options[option] := value
}
#Include <dual/dual>
dual := new Dual
#Include <dual/defaults>
#If options.swap_backtick_escape
*`::dual.comboKey({F22: "Escape"})
#If
#If options.mode == "ijkl"
*i::dual.comboKey({F22: "Up"})
*j::dual.comboKey({F22: "Left"})
*k::dual.comboKey({F22: "Down"})
*l::dual.comboKey({F22: "Right"})
*u::dual.comboKey({F22: "Home"})
*o::dual.comboKey({F22: "End"})
*h::dual.comboKey({F22: "PgUp"})
*n::dual.comboKey({F22: "PgDn"})
*m::dual.comboKey({F22: "``"})
*,::dual.comboKey({F22: "~"})
#If
#If options.mode == "ijkl2"
*i::dual.comboKey({F22: "Up"})
*j::dual.comboKey({F22: "Left"})
*k::dual.comboKey({F22: "Down"})
*l::dual.comboKey({F22: "Right"})
*,::dual.comboKey({F22: "Down"})
*u::dual.comboKey({F22: "Home"})
*m::dual.comboKey({F22: "End"})
*o::dual.comboKey({F22: "PgUp"})
*.::dual.comboKey({F22: "PgDn"})
#If
#If options.mode == "hjkl"
*h::dual.comboKey({F22: "Left"})
*j::dual.comboKey({F22: "Down"})
*k::dual.comboKey({F22: "Up"})
*l::dual.comboKey({F22: "Right"})
*y::dual.comboKey({F22: "Home"})
*u::dual.comboKey({F22: "PgUp"})
*i::dual.comboKey({F22: "PgDn"})
*o::dual.comboKey({F22: "End"})
*n::dual.comboKey({F22: "Home"})
*m::dual.comboKey({F22: "PgUp"})
*,::dual.comboKey({F22: "PgDn"})
*.::dual.comboKey({F22: "End"})
#If
#If options.mode == "wasd"
*w::dual.comboKey({F22: "Up"})
*a::dual.comboKey({F22: "Left"})
*s::dual.comboKey({F22: "Down"})
*d::dual.comboKey({F22: "Right"})
*q::dual.comboKey({F22: "Home"})
*e::dual.comboKey({F22: "End"})
*f::dual.comboKey({F22: "PgUp"})
*c::dual.comboKey({F22: "PgDn"})
#If
#If true ; Override defaults.ahk. There will be "duplicate hotkey" errors otherwise.
*Space::
*Space UP::dual.combine("F22", A_ThisHotkey, {delay: options.delay, timeout: options.timeout, doublePress: options.doublePress})
*BackSpace::dual.comboKey({F22: "Delete"})
*\::dual.comboKey({F22: "Insert"})
*b::dual.comboKey({F22: "Space"})
*1::dual.comboKey({F22: "F1"})
*2::dual.comboKey({F22: "F2"})
*3::dual.comboKey({F22: "F3"})
*4::dual.comboKey({F22: "F4"})
*5::dual.comboKey({F22: "F5"})
*6::dual.comboKey({F22: "F6"})
*7::dual.comboKey({F22: "F7"})
*8::dual.comboKey({F22: "F8"})
*9::dual.comboKey({F22: "F9"})
*0::dual.comboKey({F22: "F10"})
*-::dual.comboKey({F22: "F11"})
*=::dual.comboKey({F22: "F12"})
*p::dual.comboKey({F22: "PrintScreen"})
*[::dual.comboKey({F22: "ScrollLock"})
*]::dual.comboKey({F22: "Pause"})
*e::dual.comboKey({F22: "Escape"})
*`::dual.comboKey("Escape", {F22: "``"})
#If