From e7036f60bdae524c61307ad8de3a429b992cc15d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?m=C3=B6si?= Date: Sun, 28 Mar 2010 13:38:18 +0000 Subject: =?UTF-8?q?Feinschliff=20f=C3=BCr=20Release:=20=E2=80=A2=20BSTN=20?= =?UTF-8?q?auf=20BST=20umbenannt,=20alte=20BST=20auf=20BSTO=20umbenannt,?= =?UTF-8?q?=20alle=20Funktionsaufrufe=20adaptiert.=20=E2=80=A2=20BST-Darst?= =?UTF-8?q?ellungsupdates=20optimiert.=20Spezialbelegungen=20wie=20Einhand?= =?UTF-8?q?modus=20brauchen=20einen=20eigenen=20Parameter=20zum=20Erzwinge?= =?UTF-8?q?n=20von=20Updates=20(Check=5FBSTUpdate(1)).=20=E2=80=A2=20BST?= =?UTF-8?q?=20hat=20nun=20ihre=20eigene=20Check=5FBSTUpdate()-Funktion,=20?= =?UTF-8?q?weniger=20Spaghetti=20beim=20Kunden.=20=E2=80=A2=20Die=20Haupt-?= =?UTF-8?q?BST,=20also=20die=20neue,=20liegt=20nun=20unter=20M3-F1.=20Die?= =?UTF-8?q?=20alte=20bekommt=20M3-F2.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.neo-layout.org@2240 b9310e46-f624-0410-8ea1-cfbb3a30dc96 --- windows/neo-vars/src/source/einhandneo.ahk | 20 +- windows/neo-vars/src/source/levelfunctions.ahk | 11 +- windows/neo-vars/src/source/screenkeyboard.ahk | 437 ++++++++++++++++++--- windows/neo-vars/src/source/screenkeyboard_new.ahk | 393 ------------------ windows/neo-vars/src/source/screenkeyboard_old.ahk | 97 +++++ windows/neo-vars/src/source/varsfunctions.ahk | 3 +- 6 files changed, 486 insertions(+), 475 deletions(-) delete mode 100644 windows/neo-vars/src/source/screenkeyboard_new.ahk create mode 100644 windows/neo-vars/src/source/screenkeyboard_old.ahk diff --git a/windows/neo-vars/src/source/einhandneo.ahk b/windows/neo-vars/src/source/einhandneo.ahk index 1434793..95ed7f5 100644 --- a/windows/neo-vars/src/source/einhandneo.ahk +++ b/windows/neo-vars/src/source/einhandneo.ahk @@ -64,8 +64,8 @@ CharProc___EH1() { GUISYM("P__EHSd","EH") ED("EHSpace",0,"U000020","U000020","U000020","S__N__0","U0000A0","U00202F") - TransformProc := "Einhand" - TransformBSTNProc := "Einhand" + TransformProc := "Einhand" + TransformBSTProc := "Einhand" } CharProc___EH0() { @@ -108,17 +108,18 @@ CharProc___EH0() { ED("space",0,"U000020","U000020","U000020","S__N__0","U0000A0","U00202F") GUISYM("P__EHSd","") - TransformProc := "" - TransformBSTNProc := "" + TransformProc := "" + TransformBSTProc := "" } CharProc__EHSd() { global ; Space im Einhandmodus gedrόckt - EHSpacePressed := 1 PRspace := "P__EHSu" - if (useBSTN) - BSTNUpdate() + if (!EHSpacePressed) { + EHSpacePressed := 1 + Check_BSTUpdate(1) + } } CharProc__EHSu() { @@ -130,8 +131,7 @@ CharProc__EHSu() { } EHKeyPressed := 0 EHSpacePressed := 0 - if (useBSTN) - BSTNUpdate() + Check_BSTUpdate(1) } CharProc__M2LT() { @@ -150,7 +150,7 @@ TransformEinhand(PhysKey) { return PhysKey } -TransformBSTNEinhand(PhysKey) { +TransformBSTEinhand(PhysKey) { global if (EHSpacePressed and (TKEH_%PhysKey% != "")) { return TKEH_%PhysKey% diff --git a/windows/neo-vars/src/source/levelfunctions.ahk b/windows/neo-vars/src/source/levelfunctions.ahk index c7150dc..0e7a65a 100644 --- a/windows/neo-vars/src/source/levelfunctions.ahk +++ b/windows/neo-vars/src/source/levelfunctions.ahk @@ -20,16 +20,15 @@ NEOEbeneAktualisieren() { Ebene7 := SubStr("00000000010100000101000000000000",ModPos,1) Ebene8 := SubStr("00000000000001010000000000000101",ModPos,1) - if (BSTguiErstellt) { + if (BSTOguiErstellt) { if (striktesMod2Lock) - BSTSwitch(EbeneC) + BSTOSwitch(EbeneC) else if (EbeneNC != EbeneC) - BSTSwitch(EbeneNC . "C") + BSTOSwitch(EbeneNC . "C") else - BSTSwitch(EbeneNC) + BSTOSwitch(EbeneNC) } - if (useBSTN) - BSTNUpdate() + Check_BSTUpdate() } IsShiftActive() { diff --git a/windows/neo-vars/src/source/screenkeyboard.ahk b/windows/neo-vars/src/source/screenkeyboard.ahk index bacc3b8..0af8778 100644 --- a/windows/neo-vars/src/source/screenkeyboard.ahk +++ b/windows/neo-vars/src/source/screenkeyboard.ahk @@ -1,75 +1,276 @@ +; -*- encoding:utf-8 -*- + BSTguiErstellt := 0 BSTalwaysOnTop := 1 -BSTcapsChars := 0 - -if (FileExist("ResourceFolder")<>false) { - FileInstall,ebene1.png,%ResourceFolder%\ebene1.png,1 - FileInstall,ebene1Caps.png,%ResourceFolder%\ebene1Caps.png,1 - FileInstall,ebene2.png,%ResourceFolder%\ebene2.png,1 - FileInstall,ebene2Caps.png,%ResourceFolder%\ebene2Caps.png,1 - FileInstall,ebene3.png,%ResourceFolder%\ebene3.png,1 - FileInstall,ebene4.png,%ResourceFolder%\ebene4.png,1 - FileInstall,ebene5.png,%ResourceFolder%\ebene5.png,1 - FileInstall,ebene6.png,%ResourceFolder%\ebene6.png,1 -} -CP3F1 := "P__BSTt" -CP3F8 := "P__BSTA" +UnZipLocalFile := ResourceFolder . "\unzip.exe" +UnZipSourceLink := "http://stahlworks.com/dev/unzip.exe" + +UniFontVersion := "2.30" +UniFontFilename := "DejaVuSans-Bold.ttf" +UniFontName := "DejaVu Sans" + +UniFontZipFilename := "dejavu-fonts-ttf-" . UniFontVersion . ".zip" +UniFontZipLocalFile := ResourceFolder . "\" . UniFontZipFilename + +UniFontZipSourceLink := "http://downloads.sourceforge.net/project/dejavu/dejavu/" . UniFontVersion . "/" . UniFontZipFilename -BSTSwitch(Eb) { +UniFontLocalFilePath := ApplicationFolder +UniFontLocalFile := UniFontLocalFilePath . "/" . UniFontFilename +UniFontZipFontPath := "dejavu-fonts-ttf-" . UniFontVersion . "/ttf/" . UniFontFilename + +Check_BSTUpdate(DoBSTUpdate = 0) { global - if (Eb <> BSTEbeneAlt) { - BSTeb := Eb - if (BSTcapsChars) { - if (BSTeb == "1") - BSTeb := "1C" - else if (BSTeb == "2C") - BSTeb := "2" + if (useBST + and (DoBSTUpdate + or (Comp != BSTLastComp) + or (EbeneC != BSTLastEbeneC) + or (EbeneNC != BSTLastEbeneNC))) + BSTUpdate() +} + +BSTUpdate() { + global + static WM_SETTEXT := 0x0C + { + BSTLastComp := Comp + BSTLastEbeneC := EbeneC + BSTLastEbeneNC := EbeneNC + VarSetCapacity(ptrU,20) + loop,parse,GuiKeyList,`, + { + GuiPhysKey := A_LoopField + if (EbeneC<3) { + if (NOC%GuiPhysKey%==1) { + GuiEb := EbeneNC + } else { + GuiEb := EbeneC + } + } else + GuiEb := EbeneC + if (TransformBSTProc != "") + GuiVirtKey := TransformBST%TransformBSTProc%(GuiPhysKey) + else + GuiVirtKey := GuiPhysKey + CurrentComp := Comp + GuiComp := "" +rerun_bstnupdate: + GuiComp1 := CurrentComp . CP%GuiEb%%GuiVirtKey% + if (GSYM%GuiComp1% != "") { + GuiComp .= GSYM%GuiComp1% + } else if (CD%GuiComp1% != "") { + G_Sym := CD%GuiComp1% + if (GSYM%G_Sym% != "") + GuiComp .= GSYM%G_sym% + else + GuiComp .= CD%GuiComp1% + } else if (CM%GuiComp1% == 1) { + GuiComp .= "U00002AU00002A" + } else if (CF%CurrentComp% != "") { + if (IM%GuiVirtKey% != 1) + GuiComp .= CF%CurrentComp% + CurrentComp := "" + goto rerun_bstnupdate + } else if (CurrentComp == "") { + GuiComp .= GuiComp1 + } + GuiPos := 0 + loop { + if (GuiComp=="") + break + if (SubStr(GuiComp,1,1)=="U") { + Charcode := "0x" . Substr(GuiComp,2,6) + if (charCode < 0x10000) { + NumPut(CharCode, ptrU, GuiPos, "UShort") + } else { + ; surrogates + NumPut(0xD800|((charCode-0x10000)/1024) , ptrU, GuiPos, "UShort") + GuiPos := GuiPos + 2 + NumPut(0xDC00|((charCode-0x10000)&0x3FF), ptrU, GuiPos, "UShort") + } + GuiPos := GuiPos + 2 + } + GuiComp := SubStr(GuiComp,8) + } + NumPut(0x0 ,ptrU,GuiPos,"UShort") ; End of string + DllCall("SendMessageW", "UInt",GuiKey%GuiPhysKey%, "UInt",WM_SETTEXT, "UInt",0, "Uint",&ptrU) + } } - GuiControl,Show,Picture%BSTeb% - GuiControl,Hide,Picture%BSTEbeneAlt% - BSTEbeneAlt := Eb - } + GuiControl,MoveDraw,Picture0 +} + +GuiAddKeyS(sc,x,y) { + global + GuiAddKey(vksc%sc%,x,y) +} + +GuiAddKeySM(sc,x,y) { + global + vksc := vksc%sc% + IM%vksc% := 1 + GuiAddKey(vksc,x,y) +} + +GuiAddKeySN(sc,x,y) { + global + GuiAddKey(vkscn1%sc%,x,y) +} + +GuiAddKey(key,x,y) { + global + x:=x-4 + y:=y-10 + Gui, Add, Text, x%x% y%y% w38 h38 Center 0x200 hwndGuiKey%key% BackgroundTrans + GuiKeyList := GuiKeyList . key . "," +} + +CharProc__BSTt() { + global + ; Bildschirmtastatur togglen + useBST := !(useBST) + if (useBST) + CharProc__BST1() + else + CharProc__BST0() } BSTOnClose() { global - if (BSTguiErstellt) { - BSTguiErstellt := 0 - GuiCurrent := "" - Gui, Destroy - } + useBST := 0 + CharProc__BST0() } -BSTToggle() { +CharProc__BST0() { global - if (BSTguiErstellt) { - BSTguiErstellt := 0 - GuiCurrent := "" - Gui, Destroy - } else { - if (GuiCurrent!="") - %GuiCurrent%OnClose() - - SysGet, WorkArea, MonitorWorkArea - yPosition := WorkAreaBottom - 230 - Gui, Color, FFFFFF - Gui, Add, Picture,AltSubmit x0 y0 vPicture1, % ResourceFolder . "\ebene1.png" - Gui, Add, Picture,AltSubmit xp+0 yp+0 Hidden vPicture1C,% ResourceFolder . "\ebene1Caps.png" - Gui, Add, Picture,AltSubmit xp+0 yp+0 Hidden vPicture2, % ResourceFolder . "\ebene2.png" - Gui, Add, Picture,AltSubmit xp+0 yp+0 Hidden vPicture2C,% ResourceFolder . "\ebene2Caps.png" - Gui, Add, Picture,AltSubmit xp+0 yp+0 Hidden vPicture3, % ResourceFolder . "\ebene3.png" - Gui, Add, Picture,AltSubmit xp+0 yp+0 Hidden vPicture4, % ResourceFolder . "\ebene4.png" - Gui, Add, Picture,AltSubmit xp+0 yp+0 Hidden vPicture5, % ResourceFolder . "\ebene5.png" - Gui, Add, Picture,AltSubmit xp+0 yp+0 Hidden vPicture6, % ResourceFolder . "\ebene6.png" - Gui, +AlwaysOnTop +ToolWindow - Gui, Show, y%yposition% w776 h200 NoActivate, NEO-Bildschirmtastatur - BSTEbeneAlt := 1 - BSTguiErstellt := 1 - BSTSwitch(EbeneNC) - BSTalwaysOnTop := 1 - GuiCurrent := "BST" + GuiCurrent := "" + Gui, Destroy + DllCall( "GDI32.DLL\RemoveFontResourceEx", Str, UniFontLocalFile ,UInt,(FR_PRIVATE:=0x10), Int,0) +} + +CharProc__BST1() { + global + if (GuiCurrent!="") + %GuiCurrent%OnClose() + + if (FileExist(ResourceFolder)!="") { + FileInstall,ebene0.png,%ResourceFolder%\ebene0.png,1 } + + if (FileExist(UniFontLocalFile)=="") { + if (FileExist(UnZipLocalFile)=="") { + Progress,0,,Herunterladen des Entpack-Programms ... + UrlDownloadToFile,%UnZipSourceLink%,%UnZipLocalFile% + if (FileExist(UnZipLocalFile)=="") { + Msgbox,Konnte Unzip-Programm nicht finden und nicht installieren! + } + } + + if (FileExist(UniFontZipLocalFile)=="") { + Progress,20,Herunterladen des Fonts ... + UrlDownloadToFile,%UniFontZipSourceLink%,%UniFontZipLocalFile% + } + + Progress,80,Entpacken des Archivs ... + RunWait,% """" . UnZipLocalFile . """ -j """ . UniFontZipLocalFile . """ """ . UniFontZipFontPath . """",%UniFontLocalFilePath%,Hide + Progress,OFF + } + + DllCall( "GDI32.DLL\AddFontResourceEx", Str, UniFontLocalFile ,UInt,(FR_PRIVATE:=0x10), Int,0) + + + SysGet, WorkArea, MonitorWorkArea + yPosition := WorkAreaBottom - 230 + Gui, Color, FFFFFF + Gui, Add, Picture,AltSubmit x0 y0 vPicture0, % ResourceFolder . "\ebene0.png" + Gui, Font, s12 bold, %UniFontName% + GuiKeyList := "" + GuiAddKeyS("029",6,9) + GuiAddKeyS("002",44,9) + GuiAddKeyS("003",82,9) + GuiAddKeyS("004",120,9) + GuiAddKeyS("005",158,9) + GuiAddKeyS("006",196,9) + GuiAddKeyS("007",234,9) + GuiAddKeyS("008",272,9) + GuiAddKeyS("009",310,9) + GuiAddKeyS("00A",348,9) + GuiAddKeyS("00B",386,9) + GuiAddKeyS("00C",424,9) + GuiAddKeyS("00D",462,9) + GuiAddKey("backspace",510,9) + + GuiAddKey("tab",10,48) + GuiAddKeyS("010",58,48) + GuiAddKeyS("011",96,48) + GuiAddKeyS("012",134,48) + GuiAddKeyS("013",172,48) + GuiAddKeyS("014",210,48) + GuiAddKeyS("015",248,48) + GuiAddKeyS("016",286,48) + GuiAddKeyS("017",324,48) + GuiAddKeyS("018",362,48) + GuiAddKeyS("019",400,48) + GuiAddKeyS("01A",438,48) + GuiAddKeyS("01B",476,48) + GuiAddKey("enter",526,68) + + GuiAddKeySM("03A",18,88) + GuiAddKeyS("01E",75,88) + GuiAddKeyS("01F",113,88) + GuiAddKeyS("020",151,88) + GuiAddKeyS("021",189,88) + GuiAddKeyS("022",227,88) + GuiAddKeyS("023",265,88) + GuiAddKeyS("024",303,88) + GuiAddKeyS("025",341,88) + GuiAddKeyS("026",379,88) + GuiAddKeyS("027",417,88) + GuiAddKeyS("028",455,88) + GuiAddKeySM("02B",493,88) + + GuiAddKeySM("02A",8,128) + GuiAddKeySM("056",50,128) + GuiAddKeyS("02C",88,128) + GuiAddKeyS("02D",126,128) + GuiAddKeyS("02E",164,128) + GuiAddKeyS("02F",202,128) + GuiAddKeyS("030",240,128) + GuiAddKeyS("031",278,128) + GuiAddKeyS("032",316,128) + GuiAddKeyS("033",354,128) + GuiAddKeyS("034",392,128) + GuiAddKeyS("035",430,128) + GuiAddKeySM("136",498,128) + + GuiAddKey("space",264,168) + GuiAddKeySM("138",430,168) + + GuiAddKeyS("145",582,9) + GuiAddKeyS("135",620,9) + GuiAddKeyS("037",658,9) + GuiAddKeyS("04A",696,9) + + GuiAddKeySN("047",582,48) + GuiAddKeySN("048",620,48) + GuiAddKeySN("049",658,48) + GuiAddKeyS("04E",696,68) + + GuiAddKeySN("04B",582,88) + GuiAddKeySN("04C",620,88) + GuiAddKeySN("04D",658,88) + + GuiAddKeySN("04F",582,128) + GuiAddKeySN("050",620,128) + GuiAddKeySN("051",658,128) + GuiAddKey("numpadenter",696,148) + + GuiAddKeySN("052",601,168) + GuiAddKeySN("053",658,168) + Gui, +AlwaysOnTop +ToolWindow + Gui, Show, y%yposition% w729 h199 NoActivate, NEO-Bildschirmtastatur + BSTUpdate() + BSTalwaysOnTop := 1 + GuiCurrent := "BST" } BSTToggleAlwaysOnTop() { @@ -83,15 +284,123 @@ BSTToggleAlwaysOnTop() { } } -CharProc__BSTt() { - global - ; Bildschirmtastatur Ein/Aus - BSTToggle() -} - CharProc__BSTA() { global ; Bildschirmtastatur AlwaysOnTop if (BSTguiErstellt) BSTToggleAlwaysOnTop() } + +GUISYM(sym,chars) { + global + GSYM%sym% := EncodeUniComposeA(chars) +} + +BSTSymbols() { + global + ; diverse Symbole fΓΌr Spezialzeichen + GUISYM("T__cflx","β—ŒΜ‚") + GUISYM("T__cron","β—ŒΜŒ") + GUISYM("T__turn","↻") + GUISYM("T__abdt","β—ŒΜ‡") + GUISYM("T__hook","β—ŒΛž") ; not perfect + GUISYM("T__bldt",".") ; not perfect + + GUISYM("T__grav","β—ŒΜ€") + GUISYM("T__cedi","β—ŒΜ§") + GUISYM("T__obrg","β—ŒΜŠ") + GUISYM("T__drss","β—ŒΜˆ") + GUISYM("T_dasia","β—ŒαΏΎ") ; not perfect + GUISYM("T__mcrn","β—ŒΜ„") + + GUISYM("T__acut","β—ŒΜ") + GUISYM("T__tlde","β—ŒΜƒ") + GUISYM("T__strk","β—ŒΜ·") + GUISYM("T__dbac","β—ŒΜ‹") + GUISYM("T_psili","β—ŒαΎΏ") ; not perfect + GUISYM("U0002D8","β—ŒΜ†") + + + + GUISYM("S__Sh_L","⇧") + GUISYM("S__Sh_R","⇧") + GUISYM("S__Caps","β‡ͺ") + GUISYM("S___Del","⌦") + GUISYM("S___Ins","βŽ€") + GUISYM("S____Up","⇑") + GUISYM("S__Down","⇣") + GUISYM("S__Rght","β‡’") + GUISYM("S__Left","β‡ ") + GUISYM("S__PgUp","β‡ž") + GUISYM("S__PgDn","β‡Ÿ") + GUISYM("S__Home","β†Έ") + GUISYM("S___End","⇲") + + GUISYM("S__N__0","0") + GUISYM("S__N__1","1") + GUISYM("S__N__2","2") + GUISYM("S__N__3","3") + GUISYM("S__N__4","4") + GUISYM("S__N__5","5") + GUISYM("S__N__6","6") + GUISYM("S__N__7","7") + GUISYM("S__N__8","8") + GUISYM("S__N__9","9") + GUISYM("S__NDiv","Γ·") + GUISYM("S__NMul","Γ—") + GUISYM("S__NSub","-") + GUISYM("S__NAdd","+") + GUISYM("S__NDot",",") + GUISYM("S__NEnt","⏎") + + GUISYM("S__NDel","⌦") + GUISYM("S__NIns","βŽ€") + GUISYM("S__N_Up","⇑") + GUISYM("S__N_Dn","⇣") + GUISYM("S__N_Ri","β‡’") + GUISYM("S__N_Le","β‡ ") + GUISYM("S__NPUp","β‡ž") + GUISYM("S__NPDn","β‡Ÿ") + GUISYM("S__NHom","β†Έ") + GUISYM("S__NEnd","⇲") + + GUISYM("S_SNDel","⌦") + GUISYM("S_SNIns","βŽ€") + GUISYM("S_SN_Up","⇑") + GUISYM("S_SN_Dn","⇣") + GUISYM("S_SN_Ri","β‡’") + GUISYM("S_SN_Le","β‡ ") + GUISYM("S_SNPUp","β‡ž") + GUISYM("S_SNPDn","β‡Ÿ") + GUISYM("S_SNHom","β†Έ") + GUISYM("S_SNEnd","⇲") + + GUISYM("U00001B","⌧") + GUISYM("U000008","⌫") + GUISYM("U000009","β†Ή") + GUISYM("U00000D","⏎") + + GUISYM("P__M2LD","⇧") + GUISYM("P__M2RD","⇧") + GUISYM("P__M3LD","M3") + GUISYM("P__M3RD","M3") + GUISYM("P__M4LD","M4") + GUISYM("P__M4RD","M4") + + GUISYM("U000020","␣") + GUISYM("U0000A0","⍽") + GUISYM("U00202F",">⍽<") +} + +BSTRegister() { + global + + CP3F1 := "P__BSTt" + BSTSymbols() + + IniRead,useBST,%ini%,Global,useBST,0 + if (useBST) + CharProc__BST1() +} + +BSTRegister() diff --git a/windows/neo-vars/src/source/screenkeyboard_new.ahk b/windows/neo-vars/src/source/screenkeyboard_new.ahk deleted file mode 100644 index 5a2b677..0000000 --- a/windows/neo-vars/src/source/screenkeyboard_new.ahk +++ /dev/null @@ -1,393 +0,0 @@ -; -*- encoding:utf-8 -*- - -BSTNguiErstellt := 0 -BSTNalwaysOnTop := 1 - -UnZipLocalFile := ResourceFolder . "\unzip.exe" -UnZipSourceLink := "http://stahlworks.com/dev/unzip.exe" - -UniFontVersion := "2.30" -UniFontFilename := "DejaVuSans-Bold.ttf" -UniFontName := "DejaVu Sans" - -UniFontZipFilename := "dejavu-fonts-ttf-" . UniFontVersion . ".zip" -UniFontZipLocalFile := ResourceFolder . "\" . UniFontZipFilename - -UniFontZipSourceLink := "http://downloads.sourceforge.net/project/dejavu/dejavu/" . UniFontVersion . "/" . UniFontZipFilename - -UniFontLocalFilePath := ApplicationFolder -UniFontLocalFile := UniFontLocalFilePath . "/" . UniFontFilename -UniFontZipFontPath := "dejavu-fonts-ttf-" . UniFontVersion . "/ttf/" . UniFontFilename - -BSTNUpdate() { - global - static WM_SETTEXT := 0x0C - { - VarSetCapacity(ptrU,20) - loop,parse,GuiKeyList,`, - { - GuiPhysKey := A_LoopField - if (EbeneC<3) { - if (NOC%GuiPhysKey%==1) { - GuiEb := EbeneNC - } else { - GuiEb := EbeneC - } - } else - GuiEb := EbeneC - if (TransformBSTNProc != "") - GuiVirtKey := TransformBSTN%TransformBSTNProc%(GuiPhysKey) - else - GuiVirtKey := GuiPhysKey - CurrentComp := Comp - GuiComp := "" -rerun_bstnupdate: - GuiComp1 := CurrentComp . CP%GuiEb%%GuiVirtKey% - if (GSYM%GuiComp1% != "") { - GuiComp .= GSYM%GuiComp1% - } else if (CD%GuiComp1% != "") { - G_Sym := CD%GuiComp1% - if (GSYM%G_Sym% != "") - GuiComp .= GSYM%G_sym% - else - GuiComp .= CD%GuiComp1% - } else if (CM%GuiComp1% == 1) { - GuiComp .= "U00002AU00002A" - } else if (CF%CurrentComp% != "") { - if (IM%GuiVirtKey% != 1) - GuiComp .= CF%CurrentComp% - CurrentComp := "" - goto rerun_bstnupdate - } else if (CurrentComp == "") { - GuiComp .= GuiComp1 - } - GuiPos := 0 - loop { - if (GuiComp=="") - break - if (SubStr(GuiComp,1,1)=="U") { - Charcode := "0x" . Substr(GuiComp,2,6) - if (charCode < 0x10000) { - NumPut(CharCode, ptrU, GuiPos, "UShort") - } else { - ; surrogates - NumPut(0xD800|((charCode-0x10000)/1024) , ptrU, GuiPos, "UShort") - GuiPos := GuiPos + 2 - NumPut(0xDC00|((charCode-0x10000)&0x3FF), ptrU, GuiPos, "UShort") - } - GuiPos := GuiPos + 2 - } - GuiComp := SubStr(GuiComp,8) - } - NumPut(0x0 ,ptrU,GuiPos,"UShort") ; End of string - DllCall("SendMessageW", "UInt",GuiKey%GuiPhysKey%, "UInt",WM_SETTEXT, "UInt",0, "Uint",&ptrU) - } - } - GuiControl,MoveDraw,Picture0 -} - -GuiAddKeyS(sc,x,y) { - global - GuiAddKey(vksc%sc%,x,y) -} - -GuiAddKeySM(sc,x,y) { - global - vksc := vksc%sc% - IM%vksc% := 1 - GuiAddKey(vksc,x,y) -} - -GuiAddKeySN(sc,x,y) { - global - GuiAddKey(vkscn1%sc%,x,y) -} - -GuiAddKey(key,x,y) { - global - x:=x-4 - y:=y-10 - Gui, Add, Text, x%x% y%y% w38 h38 Center 0x200 hwndGuiKey%key% BackgroundTrans - GuiKeyList := GuiKeyList . key . "," -} - -CharProc_BSTNt() { - global - ; Bildschirmtastatur togglen - useBSTN := !(useBSTN) - if (useBSTN) - CharProc_BSTN1() - else - CharProc_BSTN0() -} - -BSTNOnClose() { - global - useBSTN := 0 - CharProc_BSTN0() -} - -CharProc_BSTN0() { - global - GuiCurrent := "" - Gui, Destroy - DllCall( "GDI32.DLL\RemoveFontResourceEx", Str, UniFontLocalFile ,UInt,(FR_PRIVATE:=0x10), Int,0) -} - -CharProc_BSTN1() { - global - if (GuiCurrent!="") - %GuiCurrent%OnClose() - - if (FileExist(ResourceFolder)!="") { - FileInstall,ebene0.png,%ResourceFolder%\ebene0.png,1 - } - - if (FileExist(UniFontLocalFile)=="") { - if (FileExist(UnZipLocalFile)=="") { - Progress,0,,Herunterladen des Entpack-Programms ... - UrlDownloadToFile,%UnZipSourceLink%,%UnZipLocalFile% - if (FileExist(UnZipLocalFile)=="") { - Msgbox,Konnte Unzip-Programm nicht finden und nicht installieren! - } - } - - if (FileExist(UniFontZipLocalFile)=="") { - Progress,20,Herunterladen des Fonts ... - UrlDownloadToFile,%UniFontZipSourceLink%,%UniFontZipLocalFile% - } - - Progress,80,Entpacken des Archivs ... - RunWait,% """" . UnZipLocalFile . """ -j """ . UniFontZipLocalFile . """ """ . UniFontZipFontPath . """",%UniFontLocalFilePath%,Hide - Progress,OFF - } - - DllCall( "GDI32.DLL\AddFontResourceEx", Str, UniFontLocalFile ,UInt,(FR_PRIVATE:=0x10), Int,0) - - - SysGet, WorkArea, MonitorWorkArea - yPosition := WorkAreaBottom - 230 - Gui, Color, FFFFFF - Gui, Add, Picture,AltSubmit x0 y0 vPicture0, % ResourceFolder . "\ebene0.png" - Gui, Font, s12 bold, %UniFontName% - GuiKeyList := "" - GuiAddKeyS("029",6,9) - GuiAddKeyS("002",44,9) - GuiAddKeyS("003",82,9) - GuiAddKeyS("004",120,9) - GuiAddKeyS("005",158,9) - GuiAddKeyS("006",196,9) - GuiAddKeyS("007",234,9) - GuiAddKeyS("008",272,9) - GuiAddKeyS("009",310,9) - GuiAddKeyS("00A",348,9) - GuiAddKeyS("00B",386,9) - GuiAddKeyS("00C",424,9) - GuiAddKeyS("00D",462,9) - GuiAddKey("backspace",510,9) - - GuiAddKey("tab",10,48) - GuiAddKeyS("010",58,48) - GuiAddKeyS("011",96,48) - GuiAddKeyS("012",134,48) - GuiAddKeyS("013",172,48) - GuiAddKeyS("014",210,48) - GuiAddKeyS("015",248,48) - GuiAddKeyS("016",286,48) - GuiAddKeyS("017",324,48) - GuiAddKeyS("018",362,48) - GuiAddKeyS("019",400,48) - GuiAddKeyS("01A",438,48) - GuiAddKeyS("01B",476,48) - GuiAddKey("enter",526,68) - - GuiAddKeySM("03A",18,88) - GuiAddKeyS("01E",75,88) - GuiAddKeyS("01F",113,88) - GuiAddKeyS("020",151,88) - GuiAddKeyS("021",189,88) - GuiAddKeyS("022",227,88) - GuiAddKeyS("023",265,88) - GuiAddKeyS("024",303,88) - GuiAddKeyS("025",341,88) - GuiAddKeyS("026",379,88) - GuiAddKeyS("027",417,88) - GuiAddKeyS("028",455,88) - GuiAddKeySM("02B",493,88) - - GuiAddKeySM("02A",8,128) - GuiAddKeySM("056",50,128) - GuiAddKeyS("02C",88,128) - GuiAddKeyS("02D",126,128) - GuiAddKeyS("02E",164,128) - GuiAddKeyS("02F",202,128) - GuiAddKeyS("030",240,128) - GuiAddKeyS("031",278,128) - GuiAddKeyS("032",316,128) - GuiAddKeyS("033",354,128) - GuiAddKeyS("034",392,128) - GuiAddKeyS("035",430,128) - GuiAddKeySM("136",498,128) - - GuiAddKey("space",264,168) - GuiAddKeySM("138",430,168) - - GuiAddKeyS("145",582,9) - GuiAddKeyS("135",620,9) - GuiAddKeyS("037",658,9) - GuiAddKeyS("04A",696,9) - - GuiAddKeySN("047",582,48) - GuiAddKeySN("048",620,48) - GuiAddKeySN("049",658,48) - GuiAddKeyS("04E",696,68) - - GuiAddKeySN("04B",582,88) - GuiAddKeySN("04C",620,88) - GuiAddKeySN("04D",658,88) - - GuiAddKeySN("04F",582,128) - GuiAddKeySN("050",620,128) - GuiAddKeySN("051",658,128) - GuiAddKey("numpadenter",696,148) - - GuiAddKeySN("052",601,168) - GuiAddKeySN("053",658,168) - Gui, +AlwaysOnTop +ToolWindow - Gui, Show, y%yposition% w729 h199 NoActivate, NEO-Bildschirmtastatur (neu!) - BSTNUpdate() - BSTNalwaysOnTop := 1 - GuiCurrent := "BSTN" -} - -BSTNToggleAlwaysOnTop() { - global - if (BSTNalwaysOnTop) { - Gui, -AlwaysOnTop - BSTNalwaysOnTop := 0 - } else { - Gui, +AlwaysOnTop - BSTNalwaysOnTop := 1 - } -} - -CharProc_BSTNA() { - global - ; Bildschirmtastatur AlwaysOnTop - if (BSTNguiErstellt) - BSTNToggleAlwaysOnTop() -} - -GUISYM(sym,chars) { - global - GSYM%sym% := EncodeUniComposeA(chars) -} - -BSTNSymbols() { - global - ; diverse Symbole fΓΌr Spezialzeichen - GUISYM("T__cflx","β—ŒΜ‚") - GUISYM("T__cron","β—ŒΜŒ") - GUISYM("T__turn","↻") - GUISYM("T__abdt","β—ŒΜ‡") - GUISYM("T__hook","β—ŒΛž") ; not perfect - GUISYM("T__bldt",".") ; not perfect - - GUISYM("T__grav","β—ŒΜ€") - GUISYM("T__cedi","β—ŒΜ§") - GUISYM("T__obrg","β—ŒΜŠ") - GUISYM("T__drss","β—ŒΜˆ") - GUISYM("T_dasia","β—ŒαΏΎ") ; not perfect - GUISYM("T__mcrn","β—ŒΜ„") - - GUISYM("T__acut","β—ŒΜ") - GUISYM("T__tlde","β—ŒΜƒ") - GUISYM("T__strk","β—ŒΜ·") - GUISYM("T__dbac","β—ŒΜ‹") - GUISYM("T_psili","β—ŒαΎΏ") ; not perfect - GUISYM("U0002D8","β—ŒΜ†") - - - - GUISYM("S__Sh_L","⇧") - GUISYM("S__Sh_R","⇧") - GUISYM("S__Caps","β‡ͺ") - GUISYM("S___Del","⌦") - GUISYM("S___Ins","βŽ€") - GUISYM("S____Up","⇑") - GUISYM("S__Down","⇣") - GUISYM("S__Rght","β‡’") - GUISYM("S__Left","β‡ ") - GUISYM("S__PgUp","β‡ž") - GUISYM("S__PgDn","β‡Ÿ") - GUISYM("S__Home","β†Έ") - GUISYM("S___End","⇲") - - GUISYM("S__N__0","0") - GUISYM("S__N__1","1") - GUISYM("S__N__2","2") - GUISYM("S__N__3","3") - GUISYM("S__N__4","4") - GUISYM("S__N__5","5") - GUISYM("S__N__6","6") - GUISYM("S__N__7","7") - GUISYM("S__N__8","8") - GUISYM("S__N__9","9") - GUISYM("S__NDiv","Γ·") - GUISYM("S__NMul","Γ—") - GUISYM("S__NSub","-") - GUISYM("S__NAdd","+") - GUISYM("S__NDot",",") - GUISYM("S__NEnt","⏎") - - GUISYM("S__NDel","⌦") - GUISYM("S__NIns","βŽ€") - GUISYM("S__N_Up","⇑") - GUISYM("S__N_Dn","⇣") - GUISYM("S__N_Ri","β‡’") - GUISYM("S__N_Le","β‡ ") - GUISYM("S__NPUp","β‡ž") - GUISYM("S__NPDn","β‡Ÿ") - GUISYM("S__NHom","β†Έ") - GUISYM("S__NEnd","⇲") - - GUISYM("S_SNDel","⌦") - GUISYM("S_SNIns","βŽ€") - GUISYM("S_SN_Up","⇑") - GUISYM("S_SN_Dn","⇣") - GUISYM("S_SN_Ri","β‡’") - GUISYM("S_SN_Le","β‡ ") - GUISYM("S_SNPUp","β‡ž") - GUISYM("S_SNPDn","β‡Ÿ") - GUISYM("S_SNHom","β†Έ") - GUISYM("S_SNEnd","⇲") - - GUISYM("U00001B","⌧") - GUISYM("U000008","⌫") - GUISYM("U000009","β†Ή") - GUISYM("U00000D","⏎") - - GUISYM("P__M2LD","⇧") - GUISYM("P__M2RD","⇧") - GUISYM("P__M3LD","M3") - GUISYM("P__M3RD","M3") - GUISYM("P__M4LD","M4") - GUISYM("P__M4RD","M4") - - GUISYM("U000020","␣") - GUISYM("U0000A0","⍽") - GUISYM("U00202F",">⍽<") -} - -BSTNRegister() { - global - - CP3F2 := "P_BSTNt" - BSTNSymbols() - - IniRead,useBSTN,%ini%,Global,useBSTN,0 - if (useBSTN) - CharProc_BSTN1() -} - -BSTNRegister() diff --git a/windows/neo-vars/src/source/screenkeyboard_old.ahk b/windows/neo-vars/src/source/screenkeyboard_old.ahk new file mode 100644 index 0000000..f9f7513 --- /dev/null +++ b/windows/neo-vars/src/source/screenkeyboard_old.ahk @@ -0,0 +1,97 @@ +BSTOguiErstellt := 0 +BSTOalwaysOnTop := 1 +BSTOcapsChars := 0 + +if (FileExist("ResourceFolder")<>false) { + FileInstall,ebene1.png,%ResourceFolder%\ebene1.png,1 + FileInstall,ebene1Caps.png,%ResourceFolder%\ebene1Caps.png,1 + FileInstall,ebene2.png,%ResourceFolder%\ebene2.png,1 + FileInstall,ebene2Caps.png,%ResourceFolder%\ebene2Caps.png,1 + FileInstall,ebene3.png,%ResourceFolder%\ebene3.png,1 + FileInstall,ebene4.png,%ResourceFolder%\ebene4.png,1 + FileInstall,ebene5.png,%ResourceFolder%\ebene5.png,1 + FileInstall,ebene6.png,%ResourceFolder%\ebene6.png,1 +} + +CP3F2 := "P_BSTOt" +CP3F8 := "P_BSTOA" + +BSTOSwitch(Eb) { + global + if (Eb <> BSTOEbeneAlt) { + BSTOeb := Eb + if (BSTOcapsChars) { + if (BSTOeb == "1") + BSTOeb := "1C" + else if (BSTOeb == "2C") + BSTOeb := "2" + } + GuiControl,Show,Picture%BSTOeb% + GuiControl,Hide,Picture%BSTOEbeneAlt% + BSTOEbeneAlt := Eb + } +} + +BSTOOnClose() { + global + if (BSTOguiErstellt) { + BSTOguiErstellt := 0 + GuiCurrent := "" + Gui, Destroy + } +} + +BSTOToggle() { + global + if (BSTOguiErstellt) { + BSTOguiErstellt := 0 + GuiCurrent := "" + Gui, Destroy + } else { + if (GuiCurrent!="") + %GuiCurrent%OnClose() + + SysGet, WorkArea, MonitorWorkArea + yPosition := WorkAreaBottom - 230 + Gui, Color, FFFFFF + Gui, Add, Picture,AltSubmit x0 y0 vPicture1, % ResourceFolder . "\ebene1.png" + Gui, Add, Picture,AltSubmit xp+0 yp+0 Hidden vPicture1C,% ResourceFolder . "\ebene1Caps.png" + Gui, Add, Picture,AltSubmit xp+0 yp+0 Hidden vPicture2, % ResourceFolder . "\ebene2.png" + Gui, Add, Picture,AltSubmit xp+0 yp+0 Hidden vPicture2C,% ResourceFolder . "\ebene2Caps.png" + Gui, Add, Picture,AltSubmit xp+0 yp+0 Hidden vPicture3, % ResourceFolder . "\ebene3.png" + Gui, Add, Picture,AltSubmit xp+0 yp+0 Hidden vPicture4, % ResourceFolder . "\ebene4.png" + Gui, Add, Picture,AltSubmit xp+0 yp+0 Hidden vPicture5, % ResourceFolder . "\ebene5.png" + Gui, Add, Picture,AltSubmit xp+0 yp+0 Hidden vPicture6, % ResourceFolder . "\ebene6.png" + Gui, +AlwaysOnTop +ToolWindow + Gui, Show, y%yposition% w776 h200 NoActivate, NEO-Bildschirmtastatur (statisch) + BSTOEbeneAlt := 1 + BSTOguiErstellt := 1 + BSTOSwitch(EbeneNC) + BSTOalwaysOnTop := 1 + GuiCurrent := "BSTO" + } +} + +BSTOToggleAlwaysOnTop() { + global + if (BSTOalwaysOnTop) { + Gui, -AlwaysOnTop + BSTOalwaysOnTop := 0 + } else { + Gui, +AlwaysOnTop + BSTOalwaysOnTop := 1 + } +} + +CharProc_BSTOt() { + global + ; Bildschirmtastatur Ein/Aus + BSTOToggle() +} + +CharProc_BSTOA() { + global + ; Bildschirmtastatur AlwaysOnTop + if (BSTOguiErstellt) + BSTOToggleAlwaysOnTop() +} diff --git a/windows/neo-vars/src/source/varsfunctions.ahk b/windows/neo-vars/src/source/varsfunctions.ahk index 5d05505..04cdeda 100644 --- a/windows/neo-vars/src/source/varsfunctions.ahk +++ b/windows/neo-vars/src/source/varsfunctions.ahk @@ -124,8 +124,7 @@ rerun: CharOutUp(PR%PhysKey%) PR%PhysKey% := "" } - if (useBSTN) - BSTNUpdate() + Check_BSTUpdate() } CharStarUp(PhysKey) { -- cgit v1.2.3