summaryrefslogtreecommitdiff
path: root/windows/XP/autohotkey/neo20-remap.ahk
diff options
context:
space:
mode:
authorerik <erik@b9310e46-f624-0410-8ea1-cfbb3a30dc96>2007-04-23 14:20:58 +0000
committererik <erik@b9310e46-f624-0410-8ea1-cfbb3a30dc96>2007-04-23 14:20:58 +0000
commit9169579236814240421310a1c03f87cd8e8715e6 (patch)
tree98a40a40e70d69eb4e52b9c271e94b2d7a5594c5 /windows/XP/autohotkey/neo20-remap.ahk
parente2d35ec70365f084eff99257d304af6ffd2cdeb2 (diff)
downloadneo-layout-9169579236814240421310a1c03f87cd8e8715e6.tar.gz
neo-layout-9169579236814240421310a1c03f87cd8e8715e6.tar.bz2
neo-layout-9169579236814240421310a1c03f87cd8e8715e6.zip
wieder im auftrag von nora: autohotkey
git-svn-id: https://svn.neo-layout.org@80 b9310e46-f624-0410-8ea1-cfbb3a30dc96
Diffstat (limited to 'windows/XP/autohotkey/neo20-remap.ahk')
-rw-r--r--windows/XP/autohotkey/neo20-remap.ahk126
1 files changed, 109 insertions, 17 deletions
diff --git a/windows/XP/autohotkey/neo20-remap.ahk b/windows/XP/autohotkey/neo20-remap.ahk
index 5b93522..104e192 100644
--- a/windows/XP/autohotkey/neo20-remap.ahk
+++ b/windows/XP/autohotkey/neo20-remap.ahk
@@ -3,43 +3,135 @@
dafür Mod5 auf AltGr und <
*/
-#singleinstance force
+;#InstallKeybdHook
#usehook on
+#singleinstance force
+
+;SendMode InputThenPlay - geht nicht
+
+name = NEO-Remap
+enable = Aktiviere %name%
+disable = Deaktiviere %name%
+
+; Menü des Systray-Icons
+; ----------------------
-name = Umbelegung AltGr und Mod5
+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%
-; Für 3. und 4. Ebene:
-; CapsLock und # (SC02B) werden zu AltGr (SC138):
+
+; 3. und 4. Ebene:
+; CapsLock und # (SC02B) werden zu AltGr (SC138)
+; ----------------------------------------------
+; http://www.autohotkey.com/forum/topic181.html
*CapsLock::
-*SC02B::
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
-*CapsLock Up::
-*SC02B Up::
+
+*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
-; Für 5. und 6. Ebene:
-; < (SC056) und AltGr werden zu Win + Ctrl:
-;Code funktioniert noch nicht so ganz, manchmal kommt nur Control Down an, aber nicht das Up, dann bleibt Control aktiv - Lösung ist dann, einmal die normale Controltaste zu drücken
-; Was sonst noch helfen kann:
-; Nach dem Drücken des Modifiers einen kleinen Moment warten
-; Soll mehr als ein Buchstabe auf der 5.\6. Ebene geschrieben werden, zwischendurch den Modifier loslassen
+; 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::
-*SC138::
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
-*SC056 Up::
-*SC138 Up::
-Send {Control Up}
+
+*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