Created
November 25, 2019 16:10
-
-
Save coppolat1/9b06d5ba0552a0d281e271545bbe0bfd to your computer and use it in GitHub Desktop.
AutoHotKey scripts to make Caps + IJKL arrow keys, plus some extras.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Make capslock a modifier, make right alt-capslock a true capslock | |
setcapslockstate, OFF ;SetCapsLockState, alwaysoff | |
/* | |
| Shortcut | Output | | |
| -------------------------------- | -------------------------------- | | |
| CAPSLOCK + { i, j, k, l } | { Up, Left, Down, Right } | | |
| CAPSLOCK + { u, o } | { Home, End } | | |
| CAPSLOCK + { h, n } | { PageUp, PageDown } | | |
| CAPSLOCK + { m } | { Delete } | | |
*/ | |
$*Capslock:: ; $ means that the hotkey code shouldn't trigger its own hotkey | |
Gui, 99:+ToolWindow | |
Gui, 99:Show, x-1 w1 NoActivate, Capslock Is Down | |
keywait, Capslock | |
Gui, 99:Destroy | |
return | |
; Made a window show up when the capslock is pressed. | |
; Now, if that hidden window is there, do anything you like | |
#IfWinExist, Capslock Is Down | |
i::Up | |
j::Left | |
k::Down | |
l::Right | |
u::Home | |
o::End | |
h::PgUp | |
n::PgDn | |
m::Del | |
#IfWinExist | |
; Oh, by the way, right-alt and capslock works like real capslock | |
ralt & Capslock:: | |
GetKeyState, capstate, Capslock, T | |
if capstate = U | |
{ | |
SetCapsLockState, on | |
} else { | |
SetCapsLockState, off | |
} | |
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Quick and dirty AutoHotKey script to use IJKL as arrows plus a couple | |
;; other remaps. This ignores any another input modifiers (Shift, Alt) | |
;; therefore it's a bit unideal. | |
SetCapsLockState, AlwaysOff | |
/* | |
| Shortcut | Output | | |
| -------------------------------- | -------------------------------- | | |
| CAPSLOCK + { i, j, k, l } | { Up, Left, Down, Right } | | |
| CAPSLOCK + { u, o } | { Home, End } | | |
| CAPSLOCK + { h, n } | { PageUp, PageDown } | | |
| CAPSLOCK + { m } | { Delete } | | |
*/ | |
CapsLock & i:: | |
Send % GetKeyState("LShift") ? "+{Up}" : "{Up}" | |
return | |
CapsLock & k:: | |
Send % GetKeyState("LShift") ? "+{Down}" : "{Down}" | |
return | |
CapsLock & j:: | |
Send % GetKeyState("LShift") ? "+{Left}" : "{Left}" | |
return | |
CapsLock & l:: | |
Send % GetKeyState("LShift") ? "+{Right}" : "{Right}" | |
return | |
CapsLock & u:: | |
Send % GetKeyState("LShift") ? "+{Home}" : "{Home}" | |
return | |
CapsLock & o:: | |
Send % GetKeyState("LShift") ? "+{End}" : "{End}" | |
return | |
CapsLock & m:: | |
Send % GetKeyState("LShift")? "+{Del}" : "{Del}" | |
return | |
CapsLock & h:: | |
Send % GetKeyState("LShift")? "+{PgUp}" : "{PgUp}" | |
return | |
CapsLock & n:: | |
Send % GetKeyState("LShift")? "+{PgDn}" : "{PgDn}" | |
return | |
return |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment