-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vimlike 0.0.0.ahk
75 lines (56 loc) · 1.84 KB
/
Vimlike 0.0.0.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
; 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: "hjkl"}
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 == "hjkl"
*k::dual.comboKey({F22: "Up"})
*h::dual.comboKey({F22: "Left"})
*j::dual.comboKey({F22: "Down"})
*l::dual.comboKey({F22: "Right"})
*e::dual.comboKey({F22: "^{RIGHT}"})
*b::dual.comboKey({F22: "^{LEFT}"})
*o::dual.comboKey({F22: "End"})
*u::dual.comboKey({F22: "PgDn"})
*i::dual.comboKey({F22: "PgUp"})
*+a::dual.comboKey({F22: "End"})
*+i::dual.comboKey({F22: "Home"})
*m::dual.comboKey({F22: "``"})
*,::dual.comboKey({F22: "~"})
#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})
*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"})
*BackSpace::dual.comboKey({F22: "Delete"})
*x::dual.comboKey({F22: "Delete"})
*+x::dual.comboKey({22: "BackSpace"})
*y::dual.comboKey({F22: "^c"})
*p::dual.comboKey({F22: "^v"})
*e::dual.comboKey({F22: "Escape"})
*`::dual.comboKey("Escape", {F22: "``"})
#If