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
122
123
124
125
126
127
128
129
130
|
; Autohotkey Capslock Remapping Script
; Colinwke
; More info at: TODO
;
; Functionality:
; - Deactivates capslock for normal (accidental) use.
; - Access the following functions when pressing Capslock:
; Cursor keys - J, K, L, I
; Home, PgDn, PgUp, End - U, O, P, ;
; Backspace and Del - Y, H
;
; Insert - [
; Close tab, window - W, N
; Previous, next tab - M, ,
; Undo, redo - ., /
; Menu - '
; - Numpad at the right hand resting position when holding Ctrl+Shift+Alt (using keys m,.jkluio and spacebar)
;
; To use capslock as you normally would, you can press WinKey + Capslock
; This script update from Danik's work: https://gist.github.com/Danik/5808330
;================================================================
#Persistent
SetCapsLockState, AlwaysOff
;================================================================
; Capslock + (ikjl) -> (up, down, left, right)
Capslock & i::Send {Blind}{Up DownTemp}
Capslock & i up::Send {Blind}{Up Up}
Capslock & k::Send {Blind}{Down DownTemp}
Capslock & k up::Send {Blind}{Down Up}
Capslock & j::Send {Blind}{Left DownTemp}
Capslock & j up::Send {Blind}{Left Up}
Capslock & l::Send {Blind}{Right DownTemp}
Capslock & l up::Send {Blind}{Right Up}
;================================================================
; Capslock + (uop;) -> (home, end, pgup, pgdown)
Capslock & u::SendInput {Blind}{Home Down}
Capslock & u up::SendInput {Blind}{Home Up}
Capslock & o::SendInput {Blind}{End Down}
Capslock & o up::SendInput {Blind}{End Up}
Capslock & `;::SendInput {Blind}{PgDn Down}
Capslock & `; up::SendInput {Blind}{PgDn Up}
Capslock & p::SendInput {Blind}{PgUp Down}
Capslock & p up::SendInput {Blind}{PgUp Up}
;================================================================
; Capslock + (nw) -> (close tab|window)
Capslock & n::SendInput {Ctrl down}{F4}{Ctrl up}
Capslock & w::SendInput {Alt down}{F4}{Alt up}
;================================================================
; Capslock + ([hy) -> (insert, backspace, del)
Capslock & [::SendInput {Blind}{Insert Down}
Capslock & y::SendInput {Blind}{Del Down}
Capslock & h::SendInput {Blind}{BS Down}
Capslock & BS::SendInput {Blind}{BS Down}
;================================================================
; Capslock + (m,) -> (prev|next tab)
Capslock & m::SendInput {Ctrl Down}{Tab Down}
Capslock & m up::SendInput {Ctrl Up}{Tab Up}
Capslock & ,::SendInput {Ctrl Down}{Shift Down}{Tab Down}
Capslock & , up::SendInput {Ctrl Up}{Shift Up}{Tab Up}
;================================================================
; Capslock + (./) -> (undo, redo)
Capslock & .::SendInput {Ctrl Down}{z Down}
Capslock & . up::SendInput {Ctrl Up}{z Up}
Capslock & /::SendInput {Ctrl Down}{y Down}
Capslock & / up::SendInput {Ctrl Up}{y Up}
;================================================================
; Capslock + ; -> menu
Capslock & '::Send {Blind}{AppsKey DownTemp}
Capslock & ' up::Send {Blind}{AppsKey Up}
;================================================================
; Numpad using Ctrl+Shift+Alt + m,.jkluio or space
+^!Space:: SendInput {Numpad0}
+^!m:: SendInput {Numpad1}
+^!,:: SendInput {Numpad2}
+^!.:: SendInput {Numpad3}
+^!j:: SendInput {Numpad4}
+^!k:: SendInput {Numpad5}
+^!l:: SendInput {Numpad6}
+^!u:: SendInput {Numpad7}
+^!i:: SendInput {Numpad8}
+^!o:: SendInput {Numpad9}
;================================================================
; Make Capslock & Enter equivalent to Control+Enter
Capslock & Enter::SendInput {Ctrl down}{Enter}{Ctrl up}
; Make Capslock & Alt Equivalent to Control+Alt
!Capslock::SendInput {Ctrl down}{Alt Down}
!Capslock up::SendInput {Ctrl up}{Alt up}
;================================================================
; Make Win Key + Capslock work like Capslock (in case it's ever needed)
#Capslock::
If GetKeyState("CapsLock", "T") = 1
SetCapsLockState, AlwaysOff
Else
SetCapsLockState, AlwaysOn
Return
|