-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAppleKeyboard.ahk
executable file
·130 lines (100 loc) · 3.22 KB
/
AppleKeyboard.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
;-------------------------------------------------------------------
; Mac keyboard to Windows Key Mappings
;
; This file is based on the work of Jonathan Ströbele
; You can find is github repo here:
; https://github.com/stroebjo/autohotkey-windows-mac-keyboard
;
; NOTE 1: use a semicolon to comment out
; key mappings if you so desire.
;
; NOTE 2: you will still need to use
; a proper keyboard layout in order to get
; your Apple keyboard behave properly.
; You can created your own layout with
; Microsoft Keyboard Layout Creator 1.4
; (http://www.microsoft.com/en-us/download/details.aspx?id=22339)
; Some layouts can be found online (search for: "apple klc")
;
;====================================================================
; --------------------------------------------------------------
; Special keys all mapped to the right option key
;
; NOTE: When using Bootcamp, media keys binding is not necessary
; --------------------------------------------------------------
; Media keys
RAlt & F7::SendInput {Media_Prev}
RAlt & F8::SendInput {Media_Play_Pause}
RAlt & F9::SendInput {Media_Next}
; Eject Key
F20::SendInput {Insert}
; F13-15, standard windows mapping
F13::SendInput {PrintScreen}
F14::SendInput {ScrollLock}
F15::SendInput {Pause}
; --------------------------------------------------------------
; OS X system shortcuts
; --------------------------------------------------------------
; New File
#n::Send ^n
; 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
; Refresh Tab
#r::Send {F5}
; Close windows (cmd + q to Alt + F4)
#q::Send !{F4}
; Remap Windows + Tab to Alt + Tab.
Lwin & Tab::AltTab
; Minimize windows
#m::WinMinimize,a
; Explorer Global Search
#IfWinActive, ahk_class CabinetWClass
#g::Send #f
#IfWinActive
; -------------------------------------------------------------
; Applications support
;
; Note: Feel free to uncomment application specific mappings
; -------------------------------------------------------------
; #Include apps\chrome.ahk
; #Include apps\mintty.ahk
; -------------------------------------------------------------
; Optional key mappings
;
; Note: Feel free to uncomment optional key mappings
; Filenames are self-explanatory
; -------------------------------------------------------------
; #Include utils\special_chars.ahk
; #Include utils\natural_scroll.ahk
; #Include utils\recycle_bin.ahk
; -------------------------------------------------------------
; Hacks
; -------------------------------------------------------------
; Allow Lock Workstation override
; See: http://www.autohotkey.com/board/topic/95733-wanna-override-win-l/
#l::
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Policies\System, DisableLockWorkstation, 0
DllCall("LockWorkStation")
sleep, 1000
RegWrite, REG_DWORD, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Policies\System, DisableLockWorkstation, 1
return