Skip to content

Instantly share code, notes, and snippets.

@eatgrass
Last active May 26, 2022 15:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eatgrass/9455d28013459db10bbad1ea13190665 to your computer and use it in GitHub Desktop.
Save eatgrass/9455d28013459db10bbad1ea13190665 to your computer and use it in GitHub Desktop.
My autohotkey script for HHKB
#MaxHotkeysPerInterval 200
ModActivateDelay := 100
*Space::
If SpacePressed ; AutoRepeat defense
Return
SpacePressed:=true
SetTimer ModActivate, % "-" ModActivateDelay
Return
*Space Up::
SpacePressed:=false
SetTimer ModActivate, Off
If ((A_PriorKey = "Space") OR !ModActive)
Send {Blind}{Space}
ModActive := false
Return
ModActivate:
ModActive := true
Return
#If (GetKeyState("Space", "P") && ModActive)
Left::WinMinimize A
Up::WinMaximize A
*vk4A::SendRemap() ; j
*vk4B::SendRemap() ; k
*vk48::SendRemap() ; h
*vk4C::SendRemap() ; l
#If
SendRemap() {
Static SendRemapArr:={j: "{Down}", k: "{Up}", h: "{Left}", l: "{Right}"}
Send % "{Blind}" SendRemapArr[GetKeyName(SubStr(A_ThisHotkey, 2))]
}
@eatgrass
Copy link
Author

eatgrass commented Jul 1, 2018

Ctrl + h,j,k,l remap Arrows
support Shift + arrow for selection
remap win key

@eatgrass
Copy link
Author

eatgrass commented May 7, 2020

Using space + {h,j,k,l} as arrow keys

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment