Skip to content

Instantly share code, notes, and snippets.

@lauritk
Last active April 14, 2020 05:00
Show Gist options
  • Save lauritk/4f51078a9ac2b519065705979443abe1 to your computer and use it in GitHub Desktop.
Save lauritk/4f51078a9ac2b519065705979443abe1 to your computer and use it in GitHub Desktop.
;--------------------------------------------
; Takes best key mappings from Mac to Windows
; Modified from https://github.com/stroebjo/autohotkey-windows-mac-keyboard/blob/master/MacKeyboard.ahk
; ! = ALT
; ^ = CTRL
; + = SHIFT
; # = WIN
;============================================
#InstallKeybdHook
#SingleInstance force
SetTitleMatchMode 2
SendMode Input
; --------------------------------------------------------------
; OS X keyboard mappings for special chars
; --------------------------------------------------------------
; Map Alt + 8 to [
!8::SendInput {[}
; Map Alt + 9 to ]
!9::SendInput {]}
; Map Shift + Alt + 8 to {
+!8::SendInput {{}
; Map Shift + Alt + 9 to }
+!9::SendInput {}}
; Map Alt + 7 to |
!7::SendInput {|}
; Map Shif + Alt + 7 to \
+!7::SendInput {\}
; Close windows (Crtl + q to Alt + F4)
^q::Send !{F4}
; ------------
; Custom
; ------------
; Right Windows Key to Menu key
RWin::Send {AppsKey}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment