From 9169579236814240421310a1c03f87cd8e8715e6 Mon Sep 17 00:00:00 2001 From: erik Date: Mon, 23 Apr 2007 14:20:58 +0000 Subject: wieder im auftrag von nora: autohotkey git-svn-id: https://svn.neo-layout.org@80 b9310e46-f624-0410-8ea1-cfbb3a30dc96 --- windows/XP/autohotkey/neo20-remap.ahk | 126 +++++++++++++++++++++++++++++----- 1 file changed, 109 insertions(+), 17 deletions(-) (limited to 'windows/XP/autohotkey/neo20-remap.ahk') 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 -- cgit v1.2.3