Skip to content

Instantly share code, notes, and snippets.

@shitpoet
Created May 19, 2018 08:58
Show Gist options
  • Save shitpoet/24965166e5fa0c35dc399fa51974ff7d to your computer and use it in GitHub Desktop.
Save shitpoet/24965166e5fa0c35dc399fa51974ff7d to your computer and use it in GitHub Desktop.
Autohotkey script to redirect navigation keys to home row
; redirect nav keys to home row
; alt+arrows to jikl and some more
; !r::Reload
; redirect alt+keys saving other mods
Redirect(key) {
if GetKeyState("Shift", "D")
if GetKeyState("Ctrl", "D")
Send +^{%key%}
else
Send +{%key%}
else if GetKeyState("Ctrl", "D")
Send ^{%key%}
else
Send {%key%}
return
}
; arrows
Alt & j::Redirect("Left")
Alt & k::Redirect("Down")
Alt & l::Redirect("Right")
Alt & i::Redirect("Up")
; home / end
Alt & u::Redirect("Home")
Alt & m::Redirect("End")
; del
Alt & n::Redirect("Delete")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment