Skip to content

Instantly share code, notes, and snippets.

@guychouk
Last active March 10, 2021 19:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save guychouk/257e7d8a9626aafcdbb18c32b4dd9b2d to your computer and use it in GitHub Desktop.
Save guychouk/257e7d8a9626aafcdbb18c32b4dd9b2d to your computer and use it in GitHub Desktop.
Enable HJKL home row keys as arrows when Space key is pressed using AutoHotkey
; Recommended for performance and compatibility with future AutoHotkey releases.
#NoEnv
; Recommended for new scripts due to its superior speed and reliability.
SendMode Input
; Ensures a consistent starting directory.
SetWorkingDir %A_ScriptDir%
; Mentioned in the hotkeys docs for UP
Space & F1::Return
; Send it explicitly when no other key is pressed before letting go
; (including any modifiers being held)
*Space::Send {Blind}{Space}
; Autohotkey_L directive for enabling following mappings when key is physically down
#If GetKeyState("Space", "p")
j::Down
l::Right
h::Left
k::Up
#If
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment