-
Notifications
You must be signed in to change notification settings - Fork 5
/
System Keys orig.ahk
73 lines (63 loc) · 2.57 KB
/
System Keys orig.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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; ;;
;; Unofficial Apple Wireless Keyboard Support ;;
;; http://code.google.com/p/uawks/ ;;
;; ;;
;; Version 2008.09.17 ;;
;; ;;
;; by Brian Jorgensen ;;
;; (based on work by Leon, Veil and Micha) ;;
;; ;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; {Left Control} --> {Windows Key}
$*LCtrl::PreferenceKeyDown("LCtrl", "RemapLeftControlToWindows", "Control Up}{LWin")
$*LCtrl Up::PreferenceKeyUp("LCtrl", "RemapLeftControlToWindows", "LWin")
;; {Apple Command Key} --> {Control}
$*LWin::PreferenceKeyDown("LWin", "RemapCommandToControl", "LCtrl")
$*LWin Up::PreferenceKeyUp("LWin", "RemapCommandToControl", "LCtrl")
$*RWin::PreferenceKeyDown("RWin", "RemapCommandToControl", "RCtrl")
$*RWin Up::PreferenceKeyUp("RWin", "RemapCommandToControl", "RCtrl")
;; {Right Alt} --> {Apple Fn Key}
RAltFnKeyDown:
PreferenceKeyFnDown("{RAlt Down}", "RemapRightOptionToFn")
return
RAltFnKeyUp:
PreferenceKeyFnUp("{RAlt Up}", "RemapRightOptionToFn")
return
; Trying to fix problems with AltGr, mostly on european layouts
RAltFnKeyEnable() {
Hotkey, $*RAlt, RAltFnKeyDown, On UseErrorLevel
Hotkey, $*RAlt Up, RAltFnKeyUp, On UseErrorLevel
}
RAltFnKeyDisable() {
Hotkey, $*RAlt, Off, UseErrorLevel
Hotkey, $*RAlt Up, Off, UseErrorLevel
}
;; {Apple Fn Key}-{Backspace} --> {Forward Delete}
$*Backspace::FnKey("{Backspace}", "{Delete}")
;; {Apple Fn Key}-{F3} --> {Print Screen}
$F3::FnKey("{F3 Down}", "", false)
$F3 Up::FnKey("{F3 Up}", "{PrintScreen}", false)
;; {Control}-{Alt}-{Backspace} --> Ctrl-Alt-Delete
#!Backspace::
^!Backspace::Run taskmgr.exe
;; {Capslock} --> {Control}
$*CapsLock::
SetKeyDelay, -1
if (RemapCapsLockToControl) {
Send, {Blind}{Control Down}
} else {
if (GetKeyState("CapsLock", "T")) {
SetCapsLockState, Off
} else {
SetCapsLockState, On
}
KeyWait, CapsLock
}
Return
$*CapsLock Up::
SetKeyDelay, -1
if (RemapCapsLockToControl) {
Send, {Blind}{Control Up}
}
Return