From d84fe91103aa98ab5c59e905c647da1fc9935b4f Mon Sep 17 00:00:00 2001 From: martin_r Date: Mon, 1 Sep 2008 23:04:37 +0000 Subject: =?UTF-8?q?Compose.ahk=20als=20zentralen=20Ort=20f=C3=BCr=20(neue)?= =?UTF-8?q?=20Cokos=20geschaffen.=20Weitere=20Vorbereitungen=20zur=20Aufna?= =?UTF-8?q?hme=20weiterer=20Cokos.=20=E2=80=BA=C2=A9=E2=80=B9=20jetzt=20au?= =?UTF-8?q?ch=20wieder=20mit=20gro=C3=9Fem=20=E2=80=BAo=E2=80=B9.?= 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/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 ++++++++++++++++------------- 5 files changed, 73 insertions(+), 25 deletions(-) create mode 100644 windows/autohotkey/Source/Compose.ahk (limited to 'windows/autohotkey/Source') 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 schönen 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 } } -- cgit v1.2.3