Last active
October 21, 2025 14:57
-
-
Save chrisfcarroll/f34487d88056e95a2e56b26e47c2ca42 to your computer and use it in GitHub Desktop.
AutoHotKey V2 Script for Mac Users on Windows. Switchable between Mac Keyboard and PC Keyboard.
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 | |
| ; | |
| ; AutoHotKey 2.0 typographic relief for Mac keyboard users on Windows, whether | |
| ; | |
| ; — plugging a Mac Keyboard into a PC | |
| ; — or using a PC keyboard and missing the extended typographic symbols that the Mac puts on the Alt keys. | |
| ; | |
| ; https://gist.github.com/chrisfcarroll/f34487d88056e95a2e56b26e47c2ca42 | |
| ; | |
| ; === autotexts ========================================================= | |
| ::ccuu::chris.carroll@myemailaddress | |
| ; | |
| ; ============================================================================= | |
| ; >>> Set these Switches to true/false to match your keyboard & preferences <<< | |
| ; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| ; | |
| isMacKeyboard := false | |
| isUkKeyboard := true | |
| useWinZCVasCtrlZCVUndoCopyPaste := false | |
| useUnixCtrlAandEForHomeEnd := false | |
| ; | |
| addCommonMacOSisms := true | |
| openCharMapOnCtrlWinDot := true | |
| openFavouriteFoldersOnWinShiftAlt := true | |
| addMacOsAltTypographicSymbols := true | |
| addMacOsAltTypographicSymbolsEvenMyIDEsShortcuts := false | |
| andTypographicSymbolsOnAltGrNumberKeys := true | |
| andTypographicSymbolsOnLeftAltShiftNumberKeys := true | |
| addVulgarFractionsOnSlashSlashSequence := true | |
| addVulgarFractionsOnAltGrShiftNumberKeys := false | |
| addFavouriteEmojis := true | |
| ; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| ; ============================================================================= | |
| ; === Unixisms ========================================================== | |
| ; Because you've come from using a Mac command line | |
| #HotIf useUnixCtrlAandEForHomeEnd | |
| ^a::Send "{Home}" | |
| ^#a::Send "{Ctrl}A" ; Ctrl-Win-A still does Select All | |
| ^e::Send "{End}" | |
| #HotIf | |
| ; === Windowsisms ======================================================= | |
| ; Because there's no right-click menu key on an apple keyboard | |
| RWin::AppsKey | |
| ; === macOSisms ======================================================== | |
| ; Windows 10 #$::Run, C:\WINDOWS\system32\SnippingTool.exe | |
| ; Windows 11 #$::Run, C:\WINDOWS\system32\SnippingTool.exe | |
| #$::Run("ms-screensketch:") | |
| ; ======================================================================= | |
| #HotIf openCharMapOnCtrlWinDot | |
| ^#.::Run "charmap.exe" | |
| #HotIf | |
| #HotIf openFavouriteFoldersOnWinShiftAlt | |
| #!+o::Run EnvGet("OneDrive") | |
| #!+h::Run EnvGet("UserProfile") | |
| #!+r::Run Format("{1}\repos", EnvGet("UserProfile")) | |
| #!+l::Run Format("{1}\Favorites\Links", EnvGet("UserProfile")) | |
| #!+s::Run Format("{1}\Desktop\Sites", EnvGet("OneDrive") ) | |
| #!+g::Run "https://gist.github.com/chrisfcarroll/" | |
| #!+a::{ | |
| if A_IsCompiled | |
| Run( Format('"{1}" "{2}"', | |
| "NotePad.exe", | |
| A_ScriptFullPath)) | |
| else | |
| Edit | |
| } | |
| ;'WinAltCtrlA to compile or reload this script' | |
| #!^a::{ | |
| if A_IsCompiled | |
| Run "Ahk2Exe.exe" | |
| else | |
| Reload | |
| } | |
| #HotIf | |
| ; === Common macos-isms ================================================= | |
| ; | |
| #HotIf addCommonMacOSisms | |
| #h::WinMinimize( "A" ) | |
| #HotIf | |
| #HotIf useWinZCVasCtrlZCVUndoCopyPaste | |
| #c::^c | |
| #v::^v | |
| #z::^z | |
| #HotIf | |
| ; === Mac Keyboard for a Mac User on Windows ============================ | |
| ; | |
| ; Basic: Plugging a Mac keyboard into a windows computer leaves you with certain keys unavailable | |
| ; unless you have installed a keyboard layout such | |
| ; as http://www.cafe-encounter.net/p84/apple-uk-keyboard-layout-for-windows | |
| ; | |
| #HotIf isMacKeyboard | |
| ¬::~ | |
| "::@ | |
| @::" | |
| ~::| | |
| #::\ | |
| #HotIf | |
| #HotIf isMacKeyboard && isUkKeyboard | |
| +3::# | |
| !+3::£ | |
| !+2::€ | |
| !+1::¡ | |
| #HotIf | |
| ; === Extended typography =================================================== | |
| ; | |
| ; Macs have a load of typographic symbols on the keyboard. | |
| ; | |
| #HotIf addMacOsAltTypographicSymbols && andTypographicSymbolsOnAltGrNumberKeys | |
| >!1::¡ | |
| >!2::™ | |
| >!3::‹ | |
| >!4::€ ; used to be ¢ ? | |
| >!5::∞ | |
| >!6::§ | |
| >!7::¶ | |
| >!8::• | |
| >!9::ª | |
| >!0::º | |
| #HotIf | |
| #HotIf isMacKeyboard && not isUkKeyboard && andTypographicSymbolsOnLeftAltShiftNumberKeys | |
| !+3::‹ | |
| #HotIf | |
| #HotIf addMacOsAltTypographicSymbols && andTypographicSymbolsOnLeftAltShiftNumberKeys | |
| !+4::› | |
| !+6::fl | |
| !+7::‡ | |
| !+8::° | |
| !+9::· | |
| !+0::‚ | |
| #HotIf | |
| #HotIf addMacOsAltTypographicSymbols | |
| !-::– | |
| !+-::— | |
| !=::!= | |
| !+=::± | |
| ![::“ | |
| !+[::” | |
| !]::‘ | |
| !+]::’ | |
| !;::… | |
| !'::æ | |
| !+'::Æ | |
| !,::<= | |
| !+,::¯ | |
| !.::>= | |
| ;!+.::breve | |
| !/::÷ | |
| !+/::¿ | |
| !_::— | |
| >!a::å | |
| >!+a::Å | |
| >!b::∫ | |
| ;!+b::i | |
| >!c::ç | |
| >!+c::Ç | |
| >!d::∂ | |
| !+d::Î | |
| >!e::´ | |
| >!+e::‰ | |
| >!f::ƒ | |
| >!+f::Ï | |
| >!g::© | |
| >!+g::Ì | |
| ;!h::overdot | |
| >!+h::Ó | |
| >!i::^ | |
| >!+i::È | |
| >!j::δ | |
| >!+j::Ô | |
| >!k::° | |
| >!+k::⌘ | |
| >!l::¬ | |
| >!+l::Ò | |
| >!m::µ | |
| >!+m::˜ | |
| >!n::~ | |
| >!+n::ˆ | |
| >!o::ø | |
| >!+o::Ø | |
| >!p::π | |
| >!+p::Π | |
| >!q::œ | |
| >!+q::Œ | |
| >!r::® | |
| >!+r::Â | |
| >!s::ß | |
| >!+s::Í | |
| >!t::† | |
| >!+t::Ê | |
| >!u::¨ | |
| >!+u::Ë | |
| >!v::v | |
| ;!+v::lozenge | |
| >!w::ε | |
| >!+w::„ | |
| >!x::≅ | |
| >!+x::Ù | |
| >!y::¥ | |
| >!+y::Á | |
| >!z::ω | |
| >!+z::Ω | |
| #HotIf | |
| #HotIf addMacOsAltTypographicSymbolsEvenMyIDEsShortcuts | |
| !\::« | |
| !+\::» | |
| #HotIf | |
| #HotIf addVulgarFractionsOnSlashSlashSequence | |
| ::1//2::½ | |
| ::1//3::⅓ | |
| ::1//4::¼ | |
| ::2//3::⅔ | |
| ::3//4::¾ | |
| #HotIf | |
| #HotIf addVulgarFractionsOnAltGrShiftNumberKeys | |
| >!+2::½ | |
| >!+3::⅓ | |
| >!+4::¼ | |
| #HotIf | |
| #HotIf addFavouriteEmojis | |
| ^#y::Send "✅" | |
| ^#x::Send "❌" | |
| ^#s::Send "💥" | |
| ^#t::Send "👍" | |
| ^#p::Send "👆" | |
| !#q::Send "❓" ;avoid ^#q because that's for QuickAssist | |
| ::`;`;y::✅ | |
| ::`;`;x::❌ | |
| ::`;`;s::💥 | |
| ::`;`;t::👍 | |
| ::`;`;p::👆 | |
| ::`;`;q::❓ | |
| #HotIf | |
| ; ======================================================================= |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment