From d84fe91103aa98ab5c59e905c647da1fc9935b4f Mon Sep 17 00:00:00 2001 From: martin_r Date: Mon, 1 Sep 2008 23:04:37 +0000 Subject: Compose.ahk als zentralen Ort für (neue) Cokos geschaffen. Weitere Vorbereitungen zur Aufnahme weiterer Cokos. ›©‹ jetzt auch wieder mit großem ›o‹. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.neo-layout.org@838 b9310e46-f624-0410-8ea1-cfbb3a30dc96 --- windows/autohotkey/Build-Update.bat | 2 +- windows/autohotkey/Changelog-and-Todo.txt | 32 +++++---- windows/autohotkey/Source/All.ahk | 1 + windows/autohotkey/Source/Compose.ahk | 39 +++++++++++ windows/autohotkey/Source/Global-Part.ahk | 1 + windows/autohotkey/Source/Keys-Neo.ahk | 15 +++-- windows/autohotkey/Source/Methods-Other.ahk | 42 ++++++------ windows/autohotkey/neo20.ahk | 97 +++++++++++++++++++++------- windows/autohotkey/neo20.exe | Bin 424045 -> 424355 bytes 9 files changed, 164 insertions(+), 65 deletions(-) create mode 100644 windows/autohotkey/Source/Compose.ahk (limited to 'windows') diff --git a/windows/autohotkey/Build-Update.bat b/windows/autohotkey/Build-Update.bat index 64106fc..fc6ebe4 100644 --- a/windows/autohotkey/Build-Update.bat +++ b/windows/autohotkey/Build-Update.bat @@ -7,7 +7,7 @@ REM tskill neo20-all-in-one echo Creating a new Driver from the Source code REM The order *is* important! -copy "Warning.ahk" + "Global-Part.ahk" + "Methods-Layers.ahk" + "Keys-Qwert-to-Neo.ahk" + "Keys-Neo.ahk" + "Methods-Lights.ahk" + "Methods-Other.ahk" + "Methods-Unicode.ahk" + "Methods-ScreenKeyboard.ahk" "..\%fn%.ahk" +copy "Warning.ahk" + "Global-Part.ahk" + "Methods-Layers.ahk" + "Keys-Qwert-to-Neo.ahk" + "Keys-Neo.ahk" + "Methods-Lights.ahk" + "Methods-Other.ahk" + "Compose.ahk" + "Methods-Unicode.ahk" + "Methods-ScreenKeyboard.ahk" "..\%fn%.ahk" REM if exist "..\Compose\Compose-all-in-one.ahk" copy "..\%fn%.ahk" + "..\Compose\Compose-all-in-one.ahk" "..\%fn%.ahk" echo Compiling the new Driver using AutoHotkey... diff --git a/windows/autohotkey/Changelog-and-Todo.txt b/windows/autohotkey/Changelog-and-Todo.txt index 826b089..b167735 100644 --- a/windows/autohotkey/Changelog-and-Todo.txt +++ b/windows/autohotkey/Changelog-and-Todo.txt @@ -23,21 +23,25 @@ Matthias Wächter === Änderungshistorie === +Revision 838 (von Martin Roppelt) +‐ Compose.ahk als zentralen Ort für Cokos geschaffen. +‐ Weitere Vorbereitungen zur Aufnahme weiterer Cokos. +‐ ›©‹ jetzt auch wieder mit großem ›o‹. Revision 833 (von Martin Roppelt) -- Cokos: ›‼‹, ›⁇‹ über ♫?2/♫!2. -- Blinde Compose jetzt auch bei SendUnicodeChar(). -- SendUnicodeChar belegt CompKey mit dem Argument. -- Nicht-blinde Compose wiederhergestellt. -- Vorbereitungen zur Aufnahme weiterer Cokos. -- Begrenzung der (blinden) Compose auf 2 Zeichen, wenn keine Übereinstimmung mit Coko vorliegt. -- »ẗ« zu den Tokos hinzugefügt. -- "DeadKey :=" in die dead*-Methoden verschoben. -- OutputChar in OutputChar12 umbenannt, OutputChar hat nur noch ein Argument. -- Code zusammengefasst, Formatierungen angepasst. -Revisionen 827-830 (von Martin Roppelt) -- 2 Achtelnoten (Composesymbol) auf 3(4). -- CapsLock-Bug Ⅱ.: CapsLock funktionierte nicht mehr, wenn eine Taste gedrückt wurde, auf die CapsLock nicht wirkt (Ziffernreihe/-block, Akzente, Punkt, Komma), da die Zeile »NoCaps = 0« in der isShiftPressed() nie ausgeführt wird. -- CapsLock-Licht wird jetzt beim (Neu-)Laden des Treibers ausgeschaltet. +‐ Cokos: ›‼‹, ›⁇‹ über ♫?2/♫!2. +‐ Blinde Compose jetzt auch bei SendUnicodeChar(). +‐ SendUnicodeChar belegt CompKey mit dem Argument. +‐ Nicht‐blinde Compose wiederhergestellt. +‐ Vorbereitungen zur Aufnahme weiterer Cokos. +‐ Begrenzung der (blinden) Compose auf 2 Zeichen, wenn keine Übereinstimmung mit Coko vorliegt. +‐ »ẗ« zu den Tokos hinzugefügt. +‐ "DeadKey :=" in die dead*‐Methoden verschoben. +‐ OutputChar in OutputChar12 umbenannt, OutputChar hat nur noch ein Argument. +‐ Code zusammengefasst, Formatierungen angepasst. +Revisionen 827‐830 (von Martin Roppelt) +‐ 2 Achtelnoten (Composesymbol) auf 3(4). +‐ CapsLock‐Bug Ⅱ.: CapsLock funktionierte nicht mehr, wenn eine Taste gedrückt wurde, auf die CapsLock nicht wirkt (Ziffernreihe/‐block, Akzente, Punkt, Komma), da die Zeile »NoCaps = 0« in der isShiftPressed() nie ausgeführt wird. +‐ CapsLock‐Licht wird jetzt beim (Neu‐)Laden des Treibers ausgeschaltet. Revision 820 (von Martin Roppelt) ‐ Weitere Cokos ergänzt: ›Ə‹, ›dž‹, ›Dž‹, ›DŽ‹, glyphengleiche griechische Majuskeln. ‐ Echter Bindestich durch Shift+Mod3+Zirkumflex, Leertaste. diff --git a/windows/autohotkey/Source/All.ahk b/windows/autohotkey/Source/All.ahk index 2eeb6ca..9639f25 100644 --- a/windows/autohotkey/Source/All.ahk +++ b/windows/autohotkey/Source/All.ahk @@ -11,6 +11,7 @@ #Include %a_scriptdir%\Keys-Neo.ahk #Include %a_scriptdir%\Methods-Lights.ahk #Include %a_scriptdir%\Methods-Other.ahk +#Include %a_scriptdir%\Compose.ahk #Include %a_scriptdir%\Methods-Unicode.ahk #Include %a_scriptdir%\Methods-ScreenKeyboard.ahk ; Eines schnen Tages sollten auch die Compose-Kombinationen automatisch aus der Referenz erzeugt werden. diff --git a/windows/autohotkey/Source/Compose.ahk b/windows/autohotkey/Source/Compose.ahk new file mode 100644 index 0000000..17c0f26 --- /dev/null +++ b/windows/autohotkey/Source/Compose.ahk @@ -0,0 +1,39 @@ +CheckCompose() { +CheckCompAsc("p_{!}","") +CheckCompAsc("P_{!}","") +CheckCompAsc("P_P","") +CheckCompAsc("t_h","") +CheckCompAsc("T_H","") +CheckCompUni("f_b",0xE030) +CheckCompUni("F_b",0xE031) +CheckCompUni("F_h",0xE032) +CheckCompUni("F_j",0xE033) +CheckCompUni("F_k",0xE034) +CheckCompUni("F_t",0xE035) +CheckCompUni("f_h",0xE036) +CheckCompUni("f_j",0xE037) +CheckCompUni("f_k",0xE038) +CheckCompUni("f_t",0xE039) +CheckCompUni("c_k",0xE03A) +CheckCompUni("c_h",0xE03B) +CheckCompUni("t_t",0xE03C) +CheckCompUni("c_t",0xE03D) +CheckCompUni("0x017F_i",0xE03E) +CheckCompUni("0x017F_0x017F",0xE03F) +CheckCompUni("0x017F_l",0xE043) +CheckCompUni("S_i",0xE044) +CheckCompUni("0x017F_s",0xE045) +CheckCompUni("t_z",0xE04A) +CheckCompUni("Q_u",0xE048) +CheckCompUni("T_h",0xE049) +CheckCompUni("{!}_{Numpad2}",0x203C) +CheckCompUni("2_{!}",0x203C) +CheckCompUni("{Numpad2}_{!}",0x203C) +CheckCompUni("?_{Numpad2}",0x2047) +CheckCompUni("2_?",0x2047) +CheckCompUni("{Numpad2}_?",0x2047) +CheckCompUni("{!}_?",0x2049) +CheckCompUni("?_{!}",0x2048) +CheckCompUni("1_?_{!}",0x203D) +CheckCompUni("1_{!}_?",0x203D) +} diff --git a/windows/autohotkey/Source/Global-Part.ahk b/windows/autohotkey/Source/Global-Part.ahk index 4532966..69a1171 100644 --- a/windows/autohotkey/Source/Global-Part.ahk +++ b/windows/autohotkey/Source/Global-Part.ahk @@ -8,6 +8,7 @@ PriorDeadKey := "" PriorCompKey := "" Ebene12 = 0 noCaps = 0 +isFurtherCompkey = 0 EbeneAktualisieren() SetBatchLines -1 diff --git a/windows/autohotkey/Source/Keys-Neo.ahk b/windows/autohotkey/Source/Keys-Neo.ahk index 4024e9d..1d88858 100644 --- a/windows/autohotkey/Source/Keys-Neo.ahk +++ b/windows/autohotkey/Source/Keys-Neo.ahk @@ -327,7 +327,8 @@ neo_c: or CheckDeadUni12("a4",0x010B,0x010A) or CheckDeadUni12("c1",0x0109,0x0108) or CheckDeadUni12("c2",0x010D,0x010C) - or CheckCompAsc("o",""))) + or CheckCompAsc12("o","","") + or CheckCompAsc12("O","",""))) OutputChar12("c","C") else if (Ebene = 3) send {blind}] @@ -648,7 +649,7 @@ neo_n: or CheckCompUni12("G","",0x039D))) OutputChar12("n","N") else if (Ebene = 3) - send {blind}( + OutputChar("(") else if ((Ebene = 4) and !(CheckDeadUni("c1",0x2074) or CheckDeadUni("c5",0x2084))) Send {blind}{NumPad4} @@ -669,7 +670,7 @@ neo_r: or CheckCompAsc12("O","",""))) OutputChar12("r","R") else if (Ebene = 3) - send {blind}) + OutputChar(")") else if ((Ebene = 4) and !(CheckDeadUni("c1",0x2075) or CheckDeadUni("c5",0x2085))) Send {blind}{NumPad5} @@ -711,7 +712,7 @@ neo_d: or CheckDeadUni12("t4",0x00F0,0x00D0))) OutputChar12("d","D") else if (Ebene = 3) - send {blind}: + OutputChar(":") else if (Ebene = 4) send `, else if (Ebene = 5) @@ -751,7 +752,9 @@ neo_ or CheckDeadUni12("t2",0x01D6,0x01D5))) OutputChar12("","") else if (Ebene = 3) - send {#} + if isMod2Locked + send {blind}{Shift Up}{#} + else send {blind}{#} else if (Ebene = 4) Send {blind}{Esc} else if (Ebene = 5) { ; leer @@ -870,7 +873,7 @@ neo_komma: else if (Ebene = 2) SendUnicodeChar(0x22EE) ; vertikale ellipse else if (Ebene = 3) - send {blind}" + OutputChar(Chr(34)) else if ((Ebene = 4) and !(CheckDeadUni("c1",0x00B2) or CheckDeadUni("c5",0x2082))) Send {blind}{NumPad2} diff --git a/windows/autohotkey/Source/Methods-Other.ahk b/windows/autohotkey/Source/Methods-Other.ahk index a330c9a..3d3fdf6 100644 --- a/windows/autohotkey/Source/Methods-Other.ahk +++ b/windows/autohotkey/Source/Methods-Other.ahk @@ -75,7 +75,6 @@ CheckCompAsc(d,val) { if !DeadCompose send {bs} send % val - isSecondCompKey = 0 return 1 } } @@ -87,7 +86,6 @@ CheckCompAsc12(d,val1,val2) { if !DeadCompose send {bs} send % val1 - isSecondCompKey = 0 return 1 } else if (Ebene = 2) and (val2 != "") { if !DeadCompose @@ -104,8 +102,8 @@ CheckCompUni(d,val) { PriorCompKey = if !DeadCompose send {bs} + isFurtherCompkey = 0 SendUnicodeChar(val) - isSecondCompKey = 0 return 1 } } @@ -117,15 +115,15 @@ CheckCompUni12(d,val1,val2){ PriorCompKey = if !DeadCompose send {bs} + isFurtherCompkey = 0 SendUnicodeChar(val1) - isSecondCompKey = 0 return 1 } else if (Ebene = 2) and (val2 != "") { PriorCompKey = if !DeadCompose send {bs} + isFurtherCompkey = 0 SendUnicodeChar(val2) - isSecondCompKey = 0 return 1 } } @@ -137,8 +135,8 @@ CheckComp3Uni(d,val) { PriorCompKey = if !DeadCompose send {bs}{bs} + isFurtherCompkey = 0 SendUnicodeChar(val) - isSecondCompKey = 0 return 1 } } @@ -150,15 +148,15 @@ CheckComp3Uni12(d,val1,val2) { PriorCompKey = if !DeadCompose send {bs}{bs} + isFurtherCompkey = 0 SendUnicodeChar(val1) - isSecondCompKey = 0 return 1 } else if (Ebene = 2) and (val2 != "") { PriorCompKey = if !DeadCompose send {bs}{bs} + isFurtherCompkey = 0 SendUnicodeChar(val2) - isSecondCompKey = 0 return 1 } } @@ -166,7 +164,7 @@ CheckComp3Uni12(d,val1,val2) { OutputChar(val) { global - if !((CheckComp(val) or PriorCompKey) and DeadCompose) + if !(CheckComp(val) and DeadCompose) send % "{blind}" . val } @@ -175,7 +173,7 @@ OutputChar12(val1,val2) { if (Ebene = 1) c := val1 else c := val2 - if !((CheckComp(c) or PriorCompKey) and DeadCompose) + if !(CheckComp(c) and DeadCompose) if GetKeyState("Shift","P") and isMod2Locked send % "{blind}{Shift Up}" . c . "{Shift Down}" else send % "{blind}" . c @@ -183,17 +181,23 @@ OutputChar12(val1,val2) { CheckComp(d) { global + if isFurtherCompkey { + PriorCompKey := CompKey := PriorCompKey . "_" . d + CheckCompose() + CompKey = + isFurtherCompkey := 0 + return 1 + } + else + if PriorCompKey { + PriorCompKey := CompKey := PriorCompKey . "_" . d + CheckCompose() + isFurtherCompKey := 1 + return 1 + } + else if (PriorDeadKey = "comp") { CompKey := d return 1 - } else if isSecondCompKey { - isSecondCompKey = 0 - CompKey = - PriorCompKey = - ;goto neo_%lastHook% - } else if PriorCompKey { - CompKey := PriorCompKey . "_" . d - isSecondCompKey = 1 - return 1 } } diff --git a/windows/autohotkey/neo20.ahk b/windows/autohotkey/neo20.ahk index e73b99c..7f6b62b 100644 --- a/windows/autohotkey/neo20.ahk +++ b/windows/autohotkey/neo20.ahk @@ -51,6 +51,7 @@ PriorDeadKey := "" PriorCompKey := "" Ebene12 = 0 noCaps = 0 +isFurtherCompkey = 0 EbeneAktualisieren() SetBatchLines -1 @@ -1075,7 +1076,8 @@ neo_c: or CheckDeadUni12("a4",0x010B,0x010A) or CheckDeadUni12("c1",0x0109,0x0108) or CheckDeadUni12("c2",0x010D,0x010C) - or CheckCompAsc("o",""))) + or CheckCompAsc12("o","","") + or CheckCompAsc12("O","",""))) OutputChar12("c","C") else if (Ebene = 3) send {blind}] @@ -1396,7 +1398,7 @@ neo_n: or CheckCompUni12("G","",0x039D))) OutputChar12("n","N") else if (Ebene = 3) - send {blind}( + OutputChar("(") else if ((Ebene = 4) and !(CheckDeadUni("c1",0x2074) or CheckDeadUni("c5",0x2084))) Send {blind}{NumPad4} @@ -1417,7 +1419,7 @@ neo_r: or CheckCompAsc12("O","",""))) OutputChar12("r","R") else if (Ebene = 3) - send {blind}) + OutputChar(")") else if ((Ebene = 4) and !(CheckDeadUni("c1",0x2075) or CheckDeadUni("c5",0x2085))) Send {blind}{NumPad5} @@ -1459,7 +1461,7 @@ neo_d: or CheckDeadUni12("t4",0x00F0,0x00D0))) OutputChar12("d","D") else if (Ebene = 3) - send {blind}: + OutputChar(":") else if (Ebene = 4) send `, else if (Ebene = 5) @@ -1499,7 +1501,9 @@ neo_ or CheckDeadUni12("t2",0x01D6,0x01D5))) OutputChar12("","") else if (Ebene = 3) - send {#} + if isMod2Locked + send {blind}{Shift Up}{#} + else send {blind}{#} else if (Ebene = 4) Send {blind}{Esc} else if (Ebene = 5) { ; leer @@ -1618,7 +1622,7 @@ neo_komma: else if (Ebene = 2) SendUnicodeChar(0x22EE) ; vertikale ellipse else if (Ebene = 3) - send {blind}" + OutputChar(Chr(34)) else if ((Ebene = 4) and !(CheckDeadUni("c1",0x00B2) or CheckDeadUni("c5",0x2082))) Send {blind}{NumPad2} @@ -2194,7 +2198,6 @@ CheckCompAsc(d,val) { if !DeadCompose send {bs} send % val - isSecondCompKey = 0 return 1 } } @@ -2206,7 +2209,6 @@ CheckCompAsc12(d,val1,val2) { if !DeadCompose send {bs} send % val1 - isSecondCompKey = 0 return 1 } else if (Ebene = 2) and (val2 != "") { if !DeadCompose @@ -2223,8 +2225,8 @@ CheckCompUni(d,val) { PriorCompKey = if !DeadCompose send {bs} + isFurtherCompkey = 0 SendUnicodeChar(val) - isSecondCompKey = 0 return 1 } } @@ -2236,15 +2238,15 @@ CheckCompUni12(d,val1,val2){ PriorCompKey = if !DeadCompose send {bs} + isFurtherCompkey = 0 SendUnicodeChar(val1) - isSecondCompKey = 0 return 1 } else if (Ebene = 2) and (val2 != "") { PriorCompKey = if !DeadCompose send {bs} + isFurtherCompkey = 0 SendUnicodeChar(val2) - isSecondCompKey = 0 return 1 } } @@ -2256,8 +2258,8 @@ CheckComp3Uni(d,val) { PriorCompKey = if !DeadCompose send {bs}{bs} + isFurtherCompkey = 0 SendUnicodeChar(val) - isSecondCompKey = 0 return 1 } } @@ -2269,15 +2271,15 @@ CheckComp3Uni12(d,val1,val2) { PriorCompKey = if !DeadCompose send {bs}{bs} + isFurtherCompkey = 0 SendUnicodeChar(val1) - isSecondCompKey = 0 return 1 } else if (Ebene = 2) and (val2 != "") { PriorCompKey = if !DeadCompose send {bs}{bs} + isFurtherCompkey = 0 SendUnicodeChar(val2) - isSecondCompKey = 0 return 1 } } @@ -2285,7 +2287,7 @@ CheckComp3Uni12(d,val1,val2) { OutputChar(val) { global - if !((CheckComp(val) or PriorCompKey) and DeadCompose) + if !(CheckComp(val) and DeadCompose) send % "{blind}" . val } @@ -2294,7 +2296,7 @@ OutputChar12(val1,val2) { if (Ebene = 1) c := val1 else c := val2 - if !((CheckComp(c) or PriorCompKey) and DeadCompose) + if !(CheckComp(c) and DeadCompose) if GetKeyState("Shift","P") and isMod2Locked send % "{blind}{Shift Up}" . c . "{Shift Down}" else send % "{blind}" . c @@ -2302,20 +2304,65 @@ OutputChar12(val1,val2) { CheckComp(d) { global + if isFurtherCompkey { + PriorCompKey := CompKey := PriorCompKey . "_" . d + CheckCompose() + CompKey = + isFurtherCompkey := 0 + return 1 + } + else + if PriorCompKey { + PriorCompKey := CompKey := PriorCompKey . "_" . d + CheckCompose() + isFurtherCompKey := 1 + return 1 + } + else if (PriorDeadKey = "comp") { CompKey := d return 1 - } else if isSecondCompKey { - isSecondCompKey = 0 - CompKey = - PriorCompKey = - ;goto neo_%lastHook% - } else if PriorCompKey { - CompKey := PriorCompKey . "_" . d - isSecondCompKey = 1 - return 1 } } +CheckCompose() { +CheckCompAsc("p_{!}","") +CheckCompAsc("P_{!}","") +CheckCompAsc("P_P","") +CheckCompAsc("t_h","") +CheckCompAsc("T_H","") +CheckCompUni("f_b",0xE030) +CheckCompUni("F_b",0xE031) +CheckCompUni("F_h",0xE032) +CheckCompUni("F_j",0xE033) +CheckCompUni("F_k",0xE034) +CheckCompUni("F_t",0xE035) +CheckCompUni("f_h",0xE036) +CheckCompUni("f_j",0xE037) +CheckCompUni("f_k",0xE038) +CheckCompUni("f_t",0xE039) +CheckCompUni("c_k",0xE03A) +CheckCompUni("c_h",0xE03B) +CheckCompUni("t_t",0xE03C) +CheckCompUni("c_t",0xE03D) +CheckCompUni("0x017F_i",0xE03E) +CheckCompUni("0x017F_0x017F",0xE03F) +CheckCompUni("0x017F_l",0xE043) +CheckCompUni("S_i",0xE044) +CheckCompUni("0x017F_s",0xE045) +CheckCompUni("t_z",0xE04A) +CheckCompUni("Q_u",0xE048) +CheckCompUni("T_h",0xE049) +CheckCompUni("{!}_{Numpad2}",0x203C) +CheckCompUni("2_{!}",0x203C) +CheckCompUni("{Numpad2}_{!}",0x203C) +CheckCompUni("?_{Numpad2}",0x2047) +CheckCompUni("2_?",0x2047) +CheckCompUni("{Numpad2}_?",0x2047) +CheckCompUni("{!}_?",0x2049) +CheckCompUni("?_{!}",0x2048) +CheckCompUni("1_?_{!}",0x203D) +CheckCompUni("1_{!}_?",0x203D) +} /* ------------------------------------------------------ Methoden zum Senden von Unicode-Zeichen diff --git a/windows/autohotkey/neo20.exe b/windows/autohotkey/neo20.exe index 1e99d51..5879782 100644 Binary files a/windows/autohotkey/neo20.exe and b/windows/autohotkey/neo20.exe differ -- cgit v1.2.3