Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 34 additions & 69 deletions win/CapsLock.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -70,77 +70,42 @@ CapsLock::Send, {ESC} ;|
; CapsLock + l | Right ;|
; Ctrl, Alt Compatible ;|
;-----------------------------------o---------------------------------o
CapsLock & h:: ;|
if GetKeyState("control") = 0 ;|
{ ;|
if GetKeyState("alt") = 0 ;|
Send, {Left} ;|
else ;|
Send, +{Left} ;|
return ;|
} ;|
else { ;|
if GetKeyState("alt") = 0 ;|
Send, ^{Left} ;|
else ;|
Send, +^{Left} ;|
return ;|
} ;|
return ;|
MoveCursor(key) { ;|
control := GetKeyState("CONTROL","P") ;|
shift := GetKeyState("SHIFT","P") ;|
alt := GetKeyState("ALT","P") ;|
win := GetKeyState("LWIN","P") ;|
ctrlShift := control && shift ;|
ctrlAlt := control && alt ;|
altShift := alt && shift ;|
ctrlAltShift := control && alt && shift ;|
if ctrlAltShift { ;|
Send, ^!+%key% ;|
} else if altShift { ;|
Send, !+%key% ;|
} else if ctrlShift { ;|
Send, ^+%key% ;|
} else if ctrlAlt { ;|
Send, ^!%key% ;|
} else if control { ;|
Send, ^%key% ;|
} else if shift { ;|
Send, +%key% ;|
} else if alt { ;|
Send, !%key% ;|
} else if win { ;|
Send, #%key% ;|
}else { ;|
Send, %key% ;|
}} ;|
;-----------------------------------o---------------------------------o
CapsLock & h::MoveCursor("{LEFT}") ;|
;-----------------------------------o ;|
CapsLock & j:: ;|
if GetKeyState("control") = 0 ;|
{ ;|
if GetKeyState("alt") = 0 ;|
Send, {Down} ;|
else ;|
Send, +{Down} ;|
return ;|
} ;|
else { ;|
if GetKeyState("alt") = 0 ;|
Send, ^{Down} ;|
else ;|
Send, +^{Down} ;|
return ;|
} ;|
return ;|
CapsLock & j::MoveCursor("{DOWN}") ;|
;-----------------------------------o ;|
CapsLock & k:: ;|
if GetKeyState("control") = 0 ;|
{ ;|
if GetKeyState("alt") = 0 ;|
Send, {Up} ;|
else ;|
Send, +{Up} ;|
return ;|
} ;|
else { ;|
if GetKeyState("alt") = 0 ;|
Send, ^{Up} ;|
else ;|
Send, +^{Up} ;|
return ;|
} ;|
return ;|
CapsLock & k::MoveCursor("{UP}") ;|
;-----------------------------------o ;|
CapsLock & l:: ;|
if GetKeyState("control") = 0 ;|
{ ;|
if GetKeyState("alt") = 0 ;|
Send, {Right} ;|
else ;|
Send, +{Right} ;|
return ;|
} ;|
else { ;|
if GetKeyState("alt") = 0 ;|
Send, ^{Right} ;|
else ;|
Send, +^{Right} ;|
return ;|
} ;|
return ;|
CapsLock & l::MoveCursor("{RIGHT}") ;|
;---------------------------------------------------------------------o


Expand Down Expand Up @@ -402,4 +367,4 @@ CapsLock & 7:: Send,+7 ;|
CapsLock & 8:: Send,+8 ;|
CapsLock & 9:: Send,+9 ;|
CapsLock & 0:: Send,+0 ;|
;---------------------------------------------------------------------o
;---------------------------------------------------------------------o