summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormösi <mösi@b9310e46-f624-0410-8ea1-cfbb3a30dc96>2010-02-11 15:28:18 +0000
committermösi <mösi@b9310e46-f624-0410-8ea1-cfbb3a30dc96>2010-02-11 15:28:18 +0000
commit0fab7cf5c607b4459ffe4467b0f62cbd744fd3b2 (patch)
treecd649fd444949173c8ea7d18f0da180292bea154
parentb77ccc4e3bc2064bfb4889859836e484f4102518 (diff)
downloadneo-layout-0fab7cf5c607b4459ffe4467b0f62cbd744fd3b2.tar.gz
neo-layout-0fab7cf5c607b4459ffe4467b0f62cbd744fd3b2.tar.bz2
neo-layout-0fab7cf5c607b4459ffe4467b0f62cbd744fd3b2.zip
Neue Bildschirmtastatur auf M3+F2
git-svn-id: https://svn.neo-layout.org@2156 b9310e46-f624-0410-8ea1-cfbb3a30dc96
-rw-r--r--windows/neo-vars/src/ebene0.pngbin0 -> 29177 bytes
-rw-r--r--windows/neo-vars/src/neo20-all.ahk1
-rw-r--r--windows/neo-vars/src/source/levelfunctions.ahk2
-rw-r--r--windows/neo-vars/src/source/screenkeyboard_new.ahk194
-rw-r--r--windows/neo-vars/src/source/varsfunctions.ahk2
5 files changed, 199 insertions, 0 deletions
diff --git a/windows/neo-vars/src/ebene0.png b/windows/neo-vars/src/ebene0.png
new file mode 100644
index 0000000..573ad54
--- /dev/null
+++ b/windows/neo-vars/src/ebene0.png
Binary files differ
diff --git a/windows/neo-vars/src/neo20-all.ahk b/windows/neo-vars/src/neo20-all.ahk
index bda598a..5e2fffb 100644
--- a/windows/neo-vars/src/neo20-all.ahk
+++ b/windows/neo-vars/src/neo20-all.ahk
@@ -28,6 +28,7 @@ SetWorkingDir, %A_ScriptDir%
; Die Bildschirmtastatur
#include source\screenkeyboard.ahk
+#include source\screenkeyboard_new.ahk
; Mitgelieferte Belegungsvarianten
#include source\langstastatur.ahk
diff --git a/windows/neo-vars/src/source/levelfunctions.ahk b/windows/neo-vars/src/source/levelfunctions.ahk
index c0a4ec1..129c95a 100644
--- a/windows/neo-vars/src/source/levelfunctions.ahk
+++ b/windows/neo-vars/src/source/levelfunctions.ahk
@@ -28,6 +28,8 @@ NEOEbeneAktualisieren() {
else
BSTSwitch(EbeneNC)
}
+ if (BSTNguiErstellt)
+ BSTNUpdate()
}
IsShiftActive() {
diff --git a/windows/neo-vars/src/source/screenkeyboard_new.ahk b/windows/neo-vars/src/source/screenkeyboard_new.ahk
new file mode 100644
index 0000000..8e61abc
--- /dev/null
+++ b/windows/neo-vars/src/source/screenkeyboard_new.ahk
@@ -0,0 +1,194 @@
+BSTNguiErstellt := 0
+BSTNalwaysOnTop := 1
+
+CP3F2 := "P_BSTNt"
+
+UnZipLocalFile := ApplicationFolder . "\unzip.exe"
+UnZipSourceLink := "http://stahlworks.com/dev/unzip.exe"
+
+UniFontVersion := "2.30"
+UniFontFilename := "DejaVuSans.ttf"
+UniFontName := "DejaVu Sans"
+
+UniFontZipFilename := "dejavu-fonts-ttf-" . UniFontVersion . ".zip"
+UniFontZipLocalFile := ApplicationFolder . "\" . UniFontZipFilename
+
+UniFontZipSourceLink := "http://downloads.sourceforge.net/project/dejavu/dejavu/" . UniFontVersion . "/" . UniFontZipFilename
+
+UniFontLocalFile := ApplicationFolder . "/" . UniFontFilename
+UniFontZipFontPath := "dejavu-fonts-ttf-" . UniFontVersion . "/ttf/" . UniFontFilename
+
+BSTNUpdate() {
+ global
+ static WM_SETTEXT := 0x0C
+ {
+ VarSetCapacity(ptrU,20)
+ loop,parse,GuiKeyList,`,
+ {
+ sc := A_LoopField
+ GuiPhysKey := vksc%sc%
+ if (EbeneC<3) {
+ if (NOC%GuiPhysKey%==1) {
+ GuiEb := EbeneNC
+ } else {
+ GuiEb := EbeneC
+ }
+ } else
+ GuiEb := EbeneC
+ GuiComp := Comp . CP%GuiEb%%GuiPhysKey%
+ if (CD%GuiComp% != "") {
+ GuiComp := CD%GuiComp%
+ } else if (CM%GuiComp% == 1) {
+ GuiComp := "U00002A"
+ } else if (Comp != "") {
+ GuiComp := ""
+ }
+ 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%sc%, "UInt",WM_SETTEXT, "UInt",0, "Uint",&ptrU)
+ }
+ }
+}
+
+GuiAddKey(sc,x,y) {
+ global
+ Gui, Add, Text, x%x% y%y% Center hwndGuiKey%sc%, MM
+ GuiKeyList := GuiKeyList . sc . ","
+}
+
+BSTNToggle() {
+ global
+ if (BSTNguiErstellt) {
+ BSTNguiErstellt := 0
+ Gui, Destroy
+ } else {
+ 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 . """",%ApplicationFolder%,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, s10 bold, %UniFontName%
+ GuiKeyList := ""
+ GuiAddKey("029",12,8)
+ GuiAddKey("002",52,8)
+ GuiAddKey("003",90,8)
+ GuiAddKey("004",128,8)
+ GuiAddKey("005",166,8)
+ GuiAddKey("006",204,8)
+ GuiAddKey("007",242,8)
+ GuiAddKey("008",280,8)
+ GuiAddKey("009",318,8)
+ GuiAddKey("00A",356,8)
+ GuiAddKey("00B",394,8)
+ GuiAddKey("00C",432,8)
+ GuiAddKey("00D",470,8)
+
+ GuiAddKey("010",64,48)
+ GuiAddKey("011",102,48)
+ GuiAddKey("012",140,48)
+ GuiAddKey("013",178,48)
+ GuiAddKey("014",216,48)
+ GuiAddKey("015",254,48)
+ GuiAddKey("016",292,48)
+ GuiAddKey("017",330,48)
+ GuiAddKey("018",368,48)
+ GuiAddKey("019",406,48)
+ GuiAddKey("01A",444,48)
+ GuiAddKey("01B",484,48)
+ GuiAddKey("00D",532,48)
+
+ GuiAddKey("01E",82,88)
+ GuiAddKey("01F",120,88)
+ GuiAddKey("020",158,88)
+ GuiAddKey("021",196,88)
+ GuiAddKey("022",234,88)
+ GuiAddKey("023",272,88)
+ GuiAddKey("024",310,88)
+ GuiAddKey("025",348,88)
+ GuiAddKey("026",386,88)
+ GuiAddKey("027",424,88)
+ GuiAddKey("028",462,88)
+
+ GuiAddKey("02C",94,128)
+ GuiAddKey("02D",132,128)
+ GuiAddKey("02E",170,128)
+ GuiAddKey("02F",208,128)
+ GuiAddKey("030",246,128)
+ GuiAddKey("031",284,128)
+ GuiAddKey("032",322,128)
+ GuiAddKey("033",360,128)
+ GuiAddKey("034",398,128)
+ GuiAddKey("035",436,128)
+ Gui, +AlwaysOnTop +ToolWindow
+ Gui, Show, y%yposition% w776 h200 NoActivate, NEO-Bildschirmtastatur (neu!)
+ BSTNguiErstellt := 1
+ BSTNUpdate()
+ BSTNalwaysOnTop := 1
+ }
+}
+
+BSTNToggleAlwaysOnTop() {
+ global
+ if (BSTNalwaysOnTop) {
+ Gui, -AlwaysOnTop
+ BSTNalwaysOnTop := 0
+ } else {
+ Gui, +AlwaysOnTop
+ BSTNalwaysOnTop := 1
+ }
+}
+
+CharProc_BSTNt() {
+ global
+ ; Bildschirmtastatur Ein/Aus
+ BSTNToggle()
+}
+
+CharProc_BSTNA() {
+ global
+ ; Bildschirmtastatur AlwaysOnTop
+ if (BSTNguiErstellt)
+ BSTNToggleAlwaysOnTop()
+}
diff --git a/windows/neo-vars/src/source/varsfunctions.ahk b/windows/neo-vars/src/source/varsfunctions.ahk
index 5e6f8a3..0532a64 100644
--- a/windows/neo-vars/src/source/varsfunctions.ahk
+++ b/windows/neo-vars/src/source/varsfunctions.ahk
@@ -124,6 +124,8 @@ rerun:
CharOutUp(PR%PhysKey%)
PR%PhysKey% := ""
}
+ if (BSTNguiErstellt)
+ BSTNUpdate()
}
CharStarUp(PhysKey) {