Skip to content

Instantly share code, notes, and snippets.

@wey-gu
Last active November 18, 2025 04:35
Show Gist options
  • Select an option

  • Save wey-gu/8712b8ebc62cc0f6236de05565a170f2 to your computer and use it in GitHub Desktop.

Select an option

Save wey-gu/8712b8ebc62cc0f6236de05565a170f2 to your computer and use it in GitHub Desktop.
hhkb_keymapping_windows

We need both Powertoy and AHK to make it working fine, and align with macOS behaviors(mostly)

Powertoy Key Mapping

  • Switch alt and win with powertoy
  • Remap shortcut for override all apps with power toy

see here

AutoHotKey v2

; HHKB macOS feel (two-way PowerToys swap: Alt↔Win)
; ⌘ position → AHK sees !   |  ⌥ position → AHK sees #

; 1. basic ⌘ combos
!c::Send "^c"
!v::Send "^v"
!x::Send "^x"
!a::Send "^a"
!s::Send "^s"
!z::Send "^z"          ; undo


; 2. Ctrl-H/J/K/L arrows
^h::Send "{Left}"
^j::Send "{Down}"
^k::Send "{Up}"
^l::Send "{Right}"

; 3. ⌘-Q  = close window
!q::Send "!{F4}"
@wey-gu
Copy link
Author

wey-gu commented Nov 18, 2025

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