Last active
December 16, 2025 02:35
-
-
Save prabowomurti/bc0a006c6fb41cbb3d204ae6441df696 to your computer and use it in GitHub Desktop.
Auto Hotkey for Mac Keyboard users on Windows 11
This file contains hidden or 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
| #Requires AutoHotkey v2.0 | |
| #SingleInstance Force | |
| ; Ignore the native Windows key behavior but still let it function as modifier key | |
| ~LWin::Send "{Blind}{vkE8}" | |
| ; as a flag for Switching Apps process status | |
| global isAltTabbing := false | |
| ; Switching Apps | |
| LCtrl & Tab:: | |
| { | |
| global isAltTabbing | |
| if (!isAltTabbing) { | |
| isAltTabbing := true | |
| Send "{Alt Down}{Tab}" | |
| } else { | |
| Send "{Tab}" | |
| } | |
| } | |
| ~LCtrl Up:: | |
| { | |
| global isAltTabbing | |
| if (isAltTabbing) { | |
| Send "{Alt Up}" | |
| isAltTabbing := false | |
| } | |
| } | |
| ; Exception for multitasking view frame | |
| #HotIf isAltTabbing | |
| ; while in the state of choosing the window, send Arrow as it is | |
| ^Left::Send "{Left}" | |
| ^Right::Send "{Right}" | |
| ^Up::Send "{Up}" | |
| ^Down::Send "{Down}" | |
| Enter:: | |
| { | |
| global isAltTabbing | |
| Send "{Alt Up}" | |
| isAltTabbing := false | |
| } | |
| #HotIf | |
| ; --- Browser/App Tab Switching --- | |
| ; Alt + Tab triggers Ctrl + Tab (Next Tab) | |
| !Tab::Send "^{Tab}" | |
| ; Alt + Shift + Tab sends Ctrl + Shift + Tab (Previous Tab) | |
| !+Tab::Send "^+{Tab}" | |
| ; --- Start Menu or Copilot overlay / Spotlight wannabe --- | |
| ; Ctrl + Space sends Ctrl + Esc | |
| ;^Space::Send "^{Esc}" | |
| ^Space::Send "!{Space}" | |
| ; --- Navigation Shortcuts (Mac Style) --- | |
| ; Command + Left (Home) | |
| ^Left::Send "{Home}" | |
| ; Command + Right (End) | |
| ^Right::Send "{End}" | |
| ; Command + Shift + Left (Select to Home) | |
| ^+Left::Send "+{Home}" | |
| ; Command + Shift + Right (Select to End) | |
| ^+Right::Send "+{End}" | |
| ; Command + Up (Top of Document) | |
| ^Up::Send "^{Home}" | |
| ; Command + Down (Bottom of Document) | |
| ^Down::Send "^{End}" | |
| ; Command + Shift + Up (Select to Top) | |
| ^+Up::Send "^+{Home}" | |
| ; Command + Shift + Down (Select to Bottom) | |
| ^+Down::Send "^+{End}" | |
| ; --- Custom Page Up/Down --- | |
| ; Windows + Up Arrow turns to Page Up | |
| #Up::Send "{PgUp}" | |
| ; Windows + Down Arrow turns to Page Down | |
| #Down::Send "{PgDn}" | |
| ; Windows + Left = Jumps one word (Ctrl + Left) | |
| #Left::Send "^{Left}" | |
| ; Windows + Right = Jumps one word (Ctrl + Right) | |
| #Right::Send "^{Right}" | |
| ; Windows + Shift + Left = (Ctrl + Shift + Left) | |
| #+Left::Send "^+{Left}" | |
| ; Windows + Shift + Right = (Ctrl + Shift + Right) | |
| #+Right::Send "^+{Right}" | |
| ; Delete per word | |
| #Backspace::Send "^{Backspace}" | |
| ; Delete one line | |
| $^Backspace::Send "+{Home}{Backspace}" | |
| ;^Backspace::Send "+{Home}{Backspace}" | |
| ; Optional: Windows (Option) + Delete = Delete Word to Right | |
| #Delete::Send "^{Delete}" | |
| ; Sniping Tool (partial) | |
| ^+4::Send "#+s" | |
| ; Sniping Tool (full screen) | |
| ^+3::Send "{PrintScreen}" | |
| ; Cmd (Ctrl) + Opt (Win) + Left = Previous Tab | |
| ^#Left::Send "^{PgUp}" | |
| ; Cmd (Ctrl) + Opt (Win) + Right = Next Tab | |
| ^#Right::Send "^{PgDn}" | |
| ; Quit Application | |
| ^q::Send "!{F4}" | |
| ; Custom script to mimic cycle through different windows but in the same app | |
| ^`:: | |
| { | |
| try { | |
| ; try to get active windows | |
| activeExe := WinGetProcessName("A") | |
| ; get the most bottom stack | |
| WinActivateBottom "ahk_exe " activeExe | |
| } | |
| } | |
| !Left::Send "^#{Left}" | |
| !Right::Send "^#{Right}" |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This file is inspired by an article by Andrew Schmelyun https://dev.to/aschmelyun/converting-my-windows-pc-to-use-macos-keybindings-mlh