Skip to content

Instantly share code, notes, and snippets.

@chrisfcarroll
Last active January 15, 2024 11:18
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 chrisfcarroll/e85a85f89d8bfcae7d9ce9e332aa3bea to your computer and use it in GitHub Desktop.
Save chrisfcarroll/e85a85f89d8bfcae7d9ce9e332aa3bea to your computer and use it in GitHub Desktop.
MacKeyboardOnPc Minimal.ahk
#Requires AutoHotkey v2.0
;
; AutoHotKey 2.0 typographic relief for Mac keyboard users on Windows, whether
; — plugging a Mac Keyboard into a PC
; — or just missing the extended typographic symbols that the Mac puts on the Alt keys.
;
; Set these Switches to true/false to match your preferences.
;
openCharMapOnWinShiftDot := true
addCommonMacOSisms := true
isMacKeyboard := true
isUkKeyboard := true
addMacOsAltTypographicSymbols := true
andTypographicSymbolsOnAltGrNumberKeys := true
andTypographicSymbolsOnLeftAltShiftNumberKeys := true
addVulgarFractionsOnAltGrShiftNumberKeys := true
; =======================================================================
#HotIf openCharMapOnWinShiftDot
#+.::Run "charmap.exe"
; === Common macos-isms =================================================
;
#HotIf addCommonMacOSisms
#h::WinMinimize( "A" )
#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 addVulgarFractionsOnAltGrShiftNumberKeys
>!+2::½
>!+3::⅓
>!+4::¼
#HotIf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment