summaryrefslogtreecommitdiff
path: root/windows/XP/autohotkey/neo20-remap.ahk
blob: 104e19227ce1d0d50a946e6bf47dfd0d22ffb7e4 (plain)
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
/*
  Umbelegung von AltGr auf CapsLock und #,
  dafür Mod5 auf AltGr und <
*/

;#InstallKeybdHook
#usehook on
#singleinstance force

;SendMode InputThenPlay - geht nicht

name = NEO-Remap
enable  = Aktiviere %name%
disable = Deaktiviere %name%

; Menü des Systray-Icons 
; ----------------------

menu, tray, nostandard
menu, tray, add, Öffnen, open
menu, tray, add
menu, tray, add, %disable%, toggleneo
menu, tray, default, %disable%
menu, tray, add
menu, tray, add, Edit, edit
menu, tray, add, Reload, reload
menu, tray, add
menu, tray, add, Nicht im Systray anzeigen, hide
menu, tray, add, %name% beenden, exitprogram
menu, tray, tip, %name%


; 3. und 4. Ebene:
; CapsLock und # (SC02B) werden zu AltGr (SC138)
; ----------------------------------------------
; http://www.autohotkey.com/forum/topic181.html

*CapsLock::
Send {SC138 Down}
Loop
{
   Sleep, 10
   GetKeyState, state, CapsLock, P
   if state = U  ; The key has been released, so break out of the loop.
      break
}
Send {SC138 Up} 
return


*SC02B::
Send {SC138 Down}
Loop
{
   Sleep, 10
   GetKeyState, state, SC02B, P
   if state = U  ; The key has been released, so break out of the loop.
      break
}
Send {SC138 Up} 
return


; 5. und 6. Ebene:
; < (SC056) und AltGr werden zu Win + Ctrl
; --------------------------------------------
  ; < funktioniert, aber bei AltGr kommt (manchmal/immer?) nur 
  ; Control Down an, aber nicht das Up, dann bleibt Control aktiv 
  ; - Lösung ist dann, einmal die normale Controltaste zu drücken.


*SC056::
Send {RWin Down}
Send {Control Down}
Loop
{
   Sleep, 10
   GetKeyState, state, SC056, P
   if state = U  ; The key has been released, so break out of the loop.
      break
}
Send {RWin Up} 
Send {Control Up} 
return


*SC138::
Send {RWin Down}
Send {Control Down}
Loop
{
   Sleep, 10
   GetKeyState, state, SC138, P
   if state = U  ; The key has been released, so break out of the loop.
      break
}
Send {RWin Up} 
Send {Control Up} 
return


;-----------------------------------------------

toggleneo:
   if state <>
   {
      state =
      menu, tray, rename, %enable%, %disable%
   }
   else
   {
      state = : Deaktiviert
      menu, tray, rename, %disable%, %enable%
   }
   menu, tray, tip, %name%%state%
   suspend
return

open:
   ListLines ; shows the Autohotkey window
return

edit:
   edit
return

reload:
   reload
return

hide:
   menu, tray, noicon
return

exitprogram:
   exitapp
return