forked from stroebjo/autohotkey-windows-mac-keyboard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MacKeyboard.ahk
190 lines (133 loc) · 3.86 KB
/
MacKeyboard.ahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
;-----------------------------------------
; Mac keyboard to Windows Key Mappings
;=========================================
; --------------------------------------------------------------
; NOTES
; --------------------------------------------------------------
; ! = ALT
; ^ = CTRL
; + = SHIFT
; # = WIN
;
; Debug action snippet: MsgBox You pressed Control-A while Notepad is active.
#InstallKeybdHook
#SingleInstance force
SetTitleMatchMode 2
SendMode Input
; --------------------------------------------------------------
; Mac-like screenshots in Windows (requires Windows 11 Snipping Tool)
; --------------------------------------------------------------
; Capture entire screen with CMD/WIN + SHIFT + 3
#3::SendInput, #{PrintScreen}
; Capture portion of the screen with CMD/WIN + SHIFT + 4
#4::SendInput {PrintScreen}
; --------------------------------------------------------------
; media/function keys all mapped to the right option key
; --------------------------------------------------------------
RAlt & F7::SendInput {Media_Prev}
RAlt & F8::SendInput {Media_Play_Pause}
RAlt & F9::SendInput {Media_Next}
F10::SendInput {Volume_Mute}
F11::SendInput {Volume_Down}
F12::SendInput {Volume_Up}
; swap left command/windows key with left alt
;LWin::LAlt
;LAlt::LWin ; add a semicolon in front of this line if you want to disable the windows key
; Remap Windows + Left OR Right to enable previous or next web page
; Use only if swapping left command/windows key with left alt
;Lwin & Left::Send, !{Left}
;Lwin & Right::Send, !{Right}
; Eject Key
;F20::SendInput {Insert} ; F20 doesn't show up on AHK anymore, see #3
; F13-15, standard windows mapping
F13::SendInput {PrintScreen}
F14::SendInput {ScrollLock}
F15::SendInput {Pause}
;F16-19 custom app launchers, see http://www.autohotkey.com/docs/Tutorial.htm for usage info
F16::Run http://twitter.com
F17::Run http://tumblr.com
F18::Run http://www.reddit.com
F19::Run https://facebook.com
; --------------------------------------------------------------
; OS X system shortcuts
; --------------------------------------------------------------
; Make Ctrl + S work with cmd (windows) key
#s::Send, ^s
; Selecting
#a::Send, ^a
; Copying
#c::Send, ^c
; Pasting
#v::Send, ^v
; Cutting
#x::Send, ^x
; Opening
#o::Send ^o
; Finding
#f::Send ^f
; Undo
#z::Send ^z
; Redo
#y::Send ^y
; New tab
#t::Send ^t
; close tab
#w::Send ^w
; Close windows (cmd + q to Alt + F4)
#q::Send !{F4}
; Remap Windows + Tab to Alt + Tab.
Lwin & Tab::AltTab
; minimize windows
#m::WinMinimize,a
; --------------------------------------------------------------
; OS X keyboard mappings for special chars
; --------------------------------------------------------------
; Map Alt + L to @
!l::SendInput {@}
; Map Alt + N to \
+!7::SendInput {\}
; Map Alt + N to ©
!g::SendInput {©}
; Map Alt + o to ø
!o::SendInput {ø}
; Map Alt + 5 to [
!5::SendInput {[}
; Map Alt + 6 to ]
!6::SendInput {]}
; Map Alt + E to €
!e::SendInput {€}
; Map Alt + - to –
!-::SendInput {–}
; Map Alt + 8 to {
!8::SendInput {{}
; Map Alt + 9 to }
!9::SendInput {}}
; Map Alt + - to ±
!+::SendInput {±}
; Map Alt + R to ®
!r::SendInput {®}
; Map Alt + N to |
!7::SendInput {|}
; Map Alt + W to ∑
!w::SendInput {∑}
; Map Alt + N to ~
!n::SendInput {~}
; Map Alt + 3 to #
!3::SendInput {#}
; --------------------------------------------------------------
; Custom mappings for special chars
; --------------------------------------------------------------
;#ö::SendInput {[}
;#ä::SendInput {]}
;^ö::SendInput {{}
;^ä::SendInput {}}
; --------------------------------------------------------------
; Application specific
; --------------------------------------------------------------
; Google Chrome
#IfWinActive, ahk_class Chrome_WidgetWin_1
; Show Web Developer Tools with cmd + alt + i
#!i::Send {F12}
; Show source code with cmd + alt + u
#!u::Send ^u
#IfWinActive