diff options
author | mösi <mösi@b9310e46-f624-0410-8ea1-cfbb3a30dc96> | 2008-11-26 20:30:52 +0000 |
---|---|---|
committer | mösi <mösi@b9310e46-f624-0410-8ea1-cfbb3a30dc96> | 2008-11-26 20:30:52 +0000 |
commit | 86d78402d8475c5ee2930ff115be69e7e3ac6a63 (patch) | |
tree | d84c2ddf56535784e8ab711f89dc36ba72f5ebeb /windows/neo-vars/src | |
parent | edbfd4487d4b8068881d17d512ca098121371750 (diff) |
• custom.ahk im APPDATA-Ordner (z.B. C:\Dokumente und Einstellungen\<benutzer>\Anwendungsdaten\NEO2\custom.ahk) wird nun dynamisch eingebunden. Im Make-Prozess wird die Datei kurzfristig umbenannt, um ein Einbinden der Datei des Maintainers ins EXE zu vermeiden.
• Bildschirmtastatur ist nun komplett in einer Datei (screenkeyboard.ahk).
• Einhand-Neo ist nun komplett in einer Datei (einhandneo.ahk).
• Lernmodus ist nun komplett in einer Datei (lernmodus.ahk).
• Lang-S-Tastatur ist nun komplett in einer Datei (langstastatur.ahk).
• Die erweiterten NEO-AHK-Funktionen (Unicode-Eingabe, -Decodieren, Römische Zahlen) sind nun komplett in einer Datei (tools.ahk).
git-svn-id: https://svn.neo-layout.org@1246 b9310e46-f624-0410-8ea1-cfbb3a30dc96
Diffstat (limited to 'windows/neo-vars/src')
-rw-r--r-- | windows/neo-vars/src/source/einhandneo.ahk | 141 | ||||
-rw-r--r-- | windows/neo-vars/src/source/initialize.ahk | 30 | ||||
-rw-r--r-- | windows/neo-vars/src/source/keydefinitions.ahk | 16 | ||||
-rw-r--r-- | windows/neo-vars/src/source/langstastatur.ahk | 39 | ||||
-rw-r--r-- | windows/neo-vars/src/source/lernmodus.ahk | 89 | ||||
-rw-r--r-- | windows/neo-vars/src/source/neovarscompose.ahk | 17 | ||||
-rw-r--r-- | windows/neo-vars/src/source/resources.ahk | 7 | ||||
-rw-r--r-- | windows/neo-vars/src/source/screenkeyboard.ahk | 30 | ||||
-rw-r--r-- | windows/neo-vars/src/source/tools.ahk | 284 | ||||
-rw-r--r-- | windows/neo-vars/src/source/varsfunctions.ahk | 475 |
10 files changed, 625 insertions, 503 deletions
diff --git a/windows/neo-vars/src/source/einhandneo.ahk b/windows/neo-vars/src/source/einhandneo.ahk new file mode 100644 index 0000000..92dbac8 --- /dev/null +++ b/windows/neo-vars/src/source/einhandneo.ahk @@ -0,0 +1,141 @@ +; öäü
+
+IniRead,einHandNeo,%ini%,Global,einHandNeo,0
+If (einHandNeo)
+ CharProc_EH1()
+
+CP3F10 := "P_EHt"
+CP5TAB := "PM2LT"
+
+CharProc_EHt() {
+ global
+ ; Einhandmodus togglen
+ einHandNeo := !(einHandNeo)
+ if (einHandNeo) {
+ CharProc_EH1()
+ if (zeigeModusBox)
+ TrayTip,NEO-Einhandmodus,Der NEO-Einhand-Modus wurde aktiviert. Zum Deaktivieren Mod3+F10 drücken.,10,1
+ } else {
+ CharProc_EH0()
+ if (zeigeModusBox)
+ TrayTip,NEO-Einhand-Modus,Der Einhandmodus wurde deaktiviert.,10,1
+ }
+}
+
+CharProc_EH1() {
+ global
+ ; Einhand-NEO aktivieren
+ ; Funktionstasten
+ TKEH_F7 := "F6" ; F7 -> F6
+ TKEH_F8 := "F5" ; F8 -> F5
+ TKEH_F9 := "F4" ; F9 -> F4
+ TKEH_F10 := "F3" ; F10 -> F3
+ TKEH_F11 := "F2" ; F11 -> F2
+ TKEH_F12 := "F1" ; F12 -> F1
+ ; Reihe 1
+ TKEH_VK37SC008 := "VK36SC007" ; 7 -> 6
+ TKEH_VK38SC009 := "VK35SC006" ; 8 -> 5
+ TKEH_VK39SC00A := "VK34SC005" ; 9 -> 4
+ TKEH_VK30SC00B := "VK33SC004" ; 0 -> 3
+ TKEH_VKDBSC00C := "VK32SC003" ; ß -> 2
+ TKEH_VKDDSC00D := "VK31SC002" ; tot2 -> 1
+ ; Reihe 2
+ TKEH_VK5ASC015 := "VK54SC014" ; k -> w
+ TKEH_VK55SC016 := "VK52SC013" ; h -> c
+ TKEH_VK49SC017 := "VK45SC012" ; g -> l
+ TKEH_VK4FSC018 := "VK57SC011" ; f -> v
+ TKEH_VK50SC019 := "VK51SC010" ; q -> x
+ TKEH_VKBASC01A := "tab" ; ß -> tab
+ TKEH_VKBBSC01B := "VKDCSC029" ; tot3 -> tot1
+ ; Reihe 3
+ TKEH_VK48SC023 := "VK47SC022" ; s -> o
+ TKEH_VK4ASC024 := "VK46SC021" ; n -> e
+ TKEH_VK4BSC025 := "VK44SC020" ; r -> a
+ TKEH_VK4CSC026 := "VK53SC01F" ; t -> i
+ TKEH_VKC0SC027 := "VK41SC01E" ; d -> u
+ ; Reihe 4
+ TKEH_VK4ESC031 := "VK42SC030" ; b -> z
+ TKEH_VK4DSC032 := "VK56SC02F" ; m -> p
+ TKEH_VKBCSC033 := "VK43SC02E" ; , -> ä
+ TKEH_VKBESC034 := "VK58SC02D" ; . -> ö
+ TKEH_VKBDSC035 := "VK59SC02C" ; j -> ü
+ ; Modify Space
+ ED1("space","PEHSd")
+ ED("EHSpace",0,"U0020","U0020","U0020","SN__0","U00A0","U202F")
+ TransformProc := "Einhand"
+}
+
+CharProc_EH0() {
+ global
+ ; Einhand-NEO deaktivieren
+ ; Funktionstasten
+ TKEH_F7 := "" ; F7
+ TKEH_F8 := "" ; F8
+ TKEH_F9 := "" ; F9
+ TKEH_F10 := "" ; F10
+ TKEH_F11 := "" ; F11
+ TKEH_F12 := "" ; F12
+ ; Reihe 1
+ TKEH_VK37SC008 := "" ; 7
+ TKEH_VK38SC009 := "" ; 8
+ TKEH_VK39SC00A := "" ; 9
+ TKEH_VK30SC00B := "" ; 0
+ TKEH_VKDBSC00C := "" ; ß
+ TKEH_VKDDSC00D := "" ; tot2
+ ; Reihe 2
+ TKEH_VK5ASC015 := "" ; k
+ TKEH_VK55SC016 := "" ; h
+ TKEH_VK49SC017 := "" ; g
+ TKEH_VK4FSC018 := "" ; f
+ TKEH_VK50SC019 := "" ; q
+ TKEH_VKBASC01A := "" ; ß
+ TKEH_VKBBSC01B := "" ; tot3
+ ; Reihe 3
+ TKEH_VK48SC023 := "" ; s
+ TKEH_VK4ASC024 := "" ; n
+ TKEH_VK4BSC025 := "" ; r
+ TKEH_VK4CSC026 := "" ; t
+ TKEH_VKC0SC027 := "" ; d
+ ; Reihe 4
+ TKEH_VK4ESC031 := "" ; b
+ TKEH_VK4DSC032 := "" ; m
+ TKEH_VKBCSC033 := "" ; ,
+ TKEH_VKBESC034 := "" ; .
+ TKEH_VKBDSC035 := "" ; j
+ ED("space",0,"U0020","U0020","U0020","SN__0","U00A0","U202F")
+ TransformProc := ""
+}
+
+CharProcEHSd() {
+ global
+ ; Space im Einhandmodus gedrückt
+ EHSpacePressed := 1
+ PRspace := "PEHSu"
+}
+
+CharProcEHSu() {
+ global
+ ; Space im Einhandmodus losgelassen
+ if (!EHKeyPressed) {
+ AllStar("*EHSpace")
+ AllStar("*EHSpace up")
+ }
+ EHKeyPressed := 0
+ EHSpacePressed := 0
+}
+
+CharProcM2LT() {
+ global
+ ; Mod2Lock Toggle
+ ToggleMod2Lock()
+ EbeneAktualisieren()
+}
+
+TransformEinhand(PhysKey) {
+ global
+ if (EHSpacePressed and (TKEH_%PhysKey% != "")) {
+ EHKeyPressed := 1
+ return TKEH_%PhysKey%
+ }
+ return PhysKey
+}
diff --git a/windows/neo-vars/src/source/initialize.ahk b/windows/neo-vars/src/source/initialize.ahk index fd2fce9..1c3e82e 100644 --- a/windows/neo-vars/src/source/initialize.ahk +++ b/windows/neo-vars/src/source/initialize.ahk @@ -36,25 +36,16 @@ disable=Deaktiviere %name% SetCapsLockState Off
SetNumLockState Off
SetScrollLockState Off
+KeyboardLED(2,"off") ; deaktivieren, falls sie doch brennt
EnvGet, WindowsEnvAppDataFolder, APPDATA
ApplicationFolder = %WindowsEnvAppDataFolder%\NEO2
FileCreateDir, %ApplicationFolder%
ini = %ApplicationFolder%\NEO2.ini
-IniRead,einHandNeo,%ini%,Global,einHandNeo,0
-IniRead,lernModus,%ini%,Global,lernModus,0
IniRead,zeigeLockBox,%ini%,Global,zeigeLockBox,1
IniRead,zeigeModusBox,%ini%,Global,zeigeModusBox,1
IniRead,UseMod4Light,%ini%,Global,UseMod4Light,1
-IniRead,LangSTastatur,%ini%,Global,LangSTastatur,0
-If LangSTastatur
- CharProc("LnS1")
-else
- KeyboardLED(2,"off") ; deaktivieren, falls sie doch brennt
-IniRead,isVM,%ini%,Global,isVM,0
-if (isVM)
- CharProc("_VM1")
IniRead,striktesMod2Lock,%ini%,Global,striktesMod2Lock,0
regread,inputlocale,HKEY_CURRENT_USER,Keyboard Layout\Preload,1
@@ -76,8 +67,7 @@ if (inputlocalealias<>inputlocale=%inputlocalealias% and inputlocale<>00000407) )
exitapp
}
-guiErstellt := 0
-alwaysOnTop := 1
+
wasNonShiftKeyPressed := 0
isShiftRPressed := 0
isShiftLPressed := 0
@@ -91,20 +81,4 @@ IsMod4LPressed := 0 IsMod4Pressed := 0
IsMod4Locked := 0
EbeneAktualisieren()
-; die Nachfolgenden sind nützlich um sich die Qwertz-Tasten abzugewöhnen, da alle auf der 4. Ebene vorhanden.
-lernModus_std_Return := 0
-lernModus_std_Backspace := 0
-lernModus_std_PgUp := 0
-lernModus_std_PgDn := 0
-lernModus_std_Einf := 0
-lernModus_std_Entf := 0
-lernModus_std_Pos0 := 0
-lernModus_std_Ende := 0
-lernModus_std_Hoch := 0
-lernModus_std_Runter := 0
-lernModus_std_Links := 0
-lernModus_std_Rechts := 0
-lernModus_std_ZahlenReihe := 0
-lernModus_neo_Backspace := 0
-lernModus_neo_Entf := 1
diff --git a/windows/neo-vars/src/source/keydefinitions.ahk b/windows/neo-vars/src/source/keydefinitions.ahk index 7b9666e..4989997 100644 --- a/windows/neo-vars/src/source/keydefinitions.ahk +++ b/windows/neo-vars/src/source/keydefinitions.ahk @@ -27,7 +27,7 @@ ED("VK50SC019",1,"U0071","U0051","U0026","SNAdd","U03D5","U211A") ; q ED("VKBASC01A",1,"U00DF","U1E9E","U017F","" ,"U03C2","U2218") ; ß
ED("VKBBSC01B",0,"Tacut","Tcedi","Tstrk","Tdbac","U1FBF","Tabdt") ; acute
; Reihe 3
-ED("VK41SC01E",1,"U0075","U0055","U005C","SHome","P_Uni","U222E") ; u
+ED("VK41SC01E",1,"U0075","U0055","U005C","SHome","" ,"U222E") ; u
ED("VK53SC01F",1,"U0069","U0049","U002F","SLeft","U03B9","U222B") ; i
ED("VK44SC020",1,"U0061","U0041","U007B","SDown","U03B1","U2200") ; a
ED("VK46SC021",1,"U0065","U0045","U007D","SRght","U03B5","U2203") ; e
@@ -75,19 +75,19 @@ EDN("VK6ESC053","VK2ESC053",0,"SNDot","U002E","U002C","SNDel","U2032","U2033") ; ; other chars
ED("space",0,"U0020","U0020","U0020","SN__0","U00A0","U202F")
ED("esc" ,0,"U001B","U001B","PRlod","U001B","U001B","U001B")
-ED("tab" ,0,"U0009","U0009","SComp","U0009","PM2LT","U0009")
-ED("F1" ,0,"S__F1","S__F1","PBSTt","S__F1","" ,"")
+ED("tab" ,0,"U0009","U0009","SComp","U0009","U0009","U0009")
+ED("F1" ,0,"S__F1","S__F1","" ,"S__F1","" ,"")
ED("F2" ,0,"S__F2","S__F2","" ,"S__F2","" ,"")
ED("F3" ,0,"S__F3","S__F3","" ,"S__F3","" ,"")
ED("F4" ,0,"S__F4","S__F4","" ,"S__F4","" ,"")
ED("F5" ,0,"S__F5","S__F5","" ,"S__F5","" ,"")
ED("F6" ,0,"S__F6","S__F6","" ,"S__F6","" ,"")
ED("F7" ,0,"S__F7","S__F7","" ,"S__F7","" ,"")
-ED("F8" ,0,"S__F8","S__F8","PBSTA","S__F8","" ,"")
-ED("F9" ,0,"S__F9","S__F9","P_LMt","S__F9","" ,"")
-ED("F10" ,0,"S_F10","S_F10","P_EHt","S_F10","" ,"")
-ED("F11" ,0,"S_F11","S_F11","PLnSt","S_F11","" ,"")
-ED("F12" ,0,"S_F12","S_F12","P_VMt","S_F12","" ,"")
+ED("F8" ,0,"S__F8","S__F8","" ,"S__F8","" ,"")
+ED("F9" ,0,"S__F9","S__F9","" ,"S__F9","" ,"")
+ED("F10" ,0,"S_F10","S_F10","" ,"S_F10","" ,"")
+ED("F11" ,0,"S_F11","S_F11","" ,"S_F11","" ,"")
+ED("F12" ,0,"S_F12","S_F12","" ,"S_F12","" ,"")
ED1("enter" ,"U000D")
ED1("backspace","U0008")
ED1("del" ,"S_Del")
diff --git a/windows/neo-vars/src/source/langstastatur.ahk b/windows/neo-vars/src/source/langstastatur.ahk new file mode 100644 index 0000000..8d3a480 --- /dev/null +++ b/windows/neo-vars/src/source/langstastatur.ahk @@ -0,0 +1,39 @@ +IniRead,LangSTastatur,%ini%,Global,LangSTastatur,0
+If (LangSTastatur)
+ CharProcLnS1()
+
+CP3F11 := "PLnSt"
+
+CharProcLnSt() {
+ global
+ ;Lang-s-Tastatur: Toggle
+ LangSTastatur := !(LangSTastatur)
+ if (LangSTastatur) {
+ CharProcLnS1()
+ if (zeigeModusBox)
+ TrayTip,Lang-S-Tastatur,Die Lang-S-Belegungsvariante wurde aktiviert. Zum Deaktivieren`, Mod3+F11 drücken.,10,1
+ } else {
+ CharProcLnS0()
+ if (zeigeModusBox)
+ TrayTip,Lang-S-Tastatur,Lang-S-Belegungsvariante wurde deaktiviert.,10,1
+ }
+}
+
+CharProcLnS1() {
+ global
+ ; Lange-s-Tastatur aktivieren
+ ED("VKBASC01A",1,"U0073","U1E9E","U00DF","" ,"U03C2","U2218") ; ß
+ ED("VK48SC023",1,"U017F","U0053","U003F","U00BF","U03C3","U03A3") ; s
+ KeyboardLED(2,"on")
+}
+
+CharProcLnS0() {
+ global
+ ; Lange-s-Tastatur deaktivieren
+ ED("VKBASC01A",1,"U00DF","U1E9E","U017F","" ,"U03C2","U2218") ; ß
+ ED("VK48SC023",1,"U0073","U0053","U003F","U00BF","U03C3","U03A3") ; s
+ KeyboardLED(2,"off")
+ if (zeigeModusBox)
+ TrayTip,Lange-s-Tastatur,Die Lange-s-Belegungsvariante wurde aktiviert. Zum Deaktivieren`, Mod3+F11 drücken.,10,1
+}
+
diff --git a/windows/neo-vars/src/source/lernmodus.ahk b/windows/neo-vars/src/source/lernmodus.ahk new file mode 100644 index 0000000..fa35d57 --- /dev/null +++ b/windows/neo-vars/src/source/lernmodus.ahk @@ -0,0 +1,89 @@ +; die Nachfolgenden sind nützlich um sich die Qwertz-Tasten abzugewöhnen, da alle auf der 4. Ebene vorhanden.
+lernModus_std_Return := 0
+lernModus_std_Backspace := 0
+lernModus_std_PgUp := 0
+lernModus_std_PgDn := 0
+lernModus_std_Einf := 0
+lernModus_std_Entf := 0
+lernModus_std_Pos0 := 0
+lernModus_std_Ende := 0
+lernModus_std_Hoch := 0
+lernModus_std_Runter := 0
+lernModus_std_Links := 0
+lernModus_std_Rechts := 0
+lernModus_std_ZahlenReihe := 0
+lernModus_neo_Backspace := 0
+lernModus_neo_Entf := 1
+
+CP3F9 := "P_LMt"
+IniRead,lernModus,%ini%,Global,lernModus,0
+If (lernModus)
+ CharProc_LM1()
+
+
+CharProc_LMt() {
+ global
+ ; Lernmodus togglen
+ lernModus := !(lernModus)
+ if (lernModus) {
+ CharProc_LM1()
+ if (zeigeModusBox)
+ TrayTip,NEO-Lernmodus,NEO-Lernmodus wurde aktiviert. Zum Deaktivieren`, Mod3+F9 drücken.,10,1
+ } else {
+ CharProc_LM0()
+ if (zeigeModusBox)
+ TrayTip,NEO-Lernmodus,Lernmodus wurde deaktiviert.,10,1
+ }
+}
+
+CharProc_LM1() {
+ global
+ ; Lernmodus aktivieren
+ if (!lernModus_std_Return)
+ ED1("enter","")
+ if (!lernModus_std_Backspace)
+ ED1("backspace","")
+ if (!lernModus_std_PgUp)
+ ED1("pgup","")
+ if (!lernModus_std_PgDn)
+ ED1("pgdn","")
+ if (!lernModus_std_Einf)
+ ED1("ins","")
+ if (!lernModus_std_Entf)
+ ED1("del","")
+ if (!lernModus_std_Pos0)
+ ED1("home","")
+ if (!lernModus_std_Ende)
+ ED1("end","")
+ if (!lernModus_std_Hoch)
+ ED1("up","")
+ if (!lernModus_std_Runter)
+ ED1("down","")
+ if (!lernModus_std_Links)
+ ED1("left","")
+ if (!lernModus_std_Rechts)
+ ED1("right","")
+ if (!lernModus_neo_Backspace)
+ CP4VK57SC011 := "" ; Ebene 4 unter v (QWERTZ: w)
+ if (!lernModus_neo_Entf)
+ CP4VK52SC013 := "" ; Ebene 4 unter c (QWERTZ: r)
+}
+
+CharProc_LM0() {
+ global
+ ; Lernmodus deaktivieren
+ ED1("enter" ,"U000D")
+ ED1("backspace","U0008")
+ ED1("pgup" ,"SPgUp")
+ ED1("pgdn" ,"SPgDn")
+ ED1("ins" ,"S_Ins")
+ ED1("del" ,"S_Del")
+ ED1("home" ,"SHome")
+ ED1("end" ,"S_End")
+ ED1("up" ,"S__Up")
+ ED1("down" ,"SDown")
+ ED1("left" ,"SLeft")
+ ED1("right" ,"SRght")
+ CP4VK57SC011 := "U0008"
+ CP4VK52SC013 := "S_Del"
+}
diff --git a/windows/neo-vars/src/source/neovarscompose.ahk b/windows/neo-vars/src/source/neovarscompose.ahk index 9ae608c..7735dcb 100644 --- a/windows/neo-vars/src/source/neovarscompose.ahk +++ b/windows/neo-vars/src/source/neovarscompose.ahk @@ -30,20 +30,3 @@ CDSCompU003DS_End := "U21D9" CDSCompSComp := "U266B"
CDSCompU000D := "U240D"
CDSCompSNEnt := "U2318"
-
-CDSCompU0072U0072 := "P_rom"
-CDSCompU0072U0052 := "P_rom"
-CDSCompU0052U0072 := "P_Rom"
-CDSCompU0052U0052 := "P_Rom"
-CMSCompU0075 := 1
-CMSCompU0055 := 1
-CDSCompU0075U0075 := "P_Uni"
-CDSCompU0075U0055 := "P_Uni"
-CDSCompU0055U0075 := "P_Uni"
-CDSCompU0055U0055 := "P_Uni"
-CMSCompU0064 := 1
-CMSCompU0044 := 1
-CDSCompU0064U0064 := "PDUni"
-CDSCompU0064U0044 := "PDUni"
-CDSCompU0044U0064 := "PDUni"
-CDSCompU0044U0044 := "PDUni"
diff --git a/windows/neo-vars/src/source/resources.ahk b/windows/neo-vars/src/source/resources.ahk index c921fe5..5b762fc 100644 --- a/windows/neo-vars/src/source/resources.ahk +++ b/windows/neo-vars/src/source/resources.ahk @@ -5,12 +5,5 @@ FileCreateDir, %ResourceFolder% if (FileExist("ResourceFolder")<>false) {
FileInstall,neo_enabled.ico,%ResourceFolder%\neo_enabled.ico,1
FileInstall,neo_disabled.ico,%ResourceFolder%\neo_disabled.ico,1
- FileInstall,ebene1.png,%ResourceFolder%\ebene1.png,1
- FileInstall,ebene2.png,%ResourceFolder%\ebene2.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
- FileInstall,deadkeys.png,%ResourceFolder%\deadkeys.png,1
}
diff --git a/windows/neo-vars/src/source/screenkeyboard.ahk b/windows/neo-vars/src/source/screenkeyboard.ahk index 56ba5db..2b2d66d 100644 --- a/windows/neo-vars/src/source/screenkeyboard.ahk +++ b/windows/neo-vars/src/source/screenkeyboard.ahk @@ -1,3 +1,19 @@ +guiErstellt := 0
+alwaysOnTop := 1
+
+if (FileExist("ResourceFolder")<>false) {
+ FileInstall,ebene1.png,%ResourceFolder%\ebene1.png,1
+ FileInstall,ebene2.png,%ResourceFolder%\ebene2.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
+ FileInstall,deadkeys.png,%ResourceFolder%\deadkeys.png,1
+}
+
+CP3F1 := "PBSTt"
+CP3F8 := "PBSTA"
+
BSTSwitch(Eb) {
global
if (Eb <> EbeneAlt) {
@@ -40,3 +56,17 @@ BSTToggleAlwaysOnTop() { alwaysOnTop := 1
}
}
+
+CharProcBSTt() {
+ global
+ ; Bildschirmtastatur Ein/Aus
+ BSTToggle()
+}
+
+CharProcBSTA() {
+ global
+ ; Bildschirmtastatur AlwaysOnTop
+ if (guiErstellt)
+ BSTToggleAlwaysOnTop()
+}
+
diff --git a/windows/neo-vars/src/source/tools.ahk b/windows/neo-vars/src/source/tools.ahk new file mode 100644 index 0000000..d248cf4 --- /dev/null +++ b/windows/neo-vars/src/source/tools.ahk @@ -0,0 +1,284 @@ +; äöü
+
+; Römische Zahlen
+
+CMSCompU0072 := 1
+CMSCompU0052 := 1
+CDSCompU0072U0072 := "PRom1"
+CDSCompU0072U0031 := "PRom1"
+CDSCompU0052U0031 := "PRom1"
+CDSCompU0072U0052 := "PRom2"
+CDSCompU0072U0032 := "PRom2"
+CDSCompU0052U0032 := "PRom2"
+CDSCompU0052U0072 := "PRom3"
+CDSCompU0072U0033 := "PRom3"
+CDSCompU0052U0033 := "PRom3"
+CDSCompU0052U0052 := "PRom4"
+CDSCompU0072U0034 := "PRom4"
+CDSCompU0052U0034 := "PRom4"
+
+CharProcRom1() {
+ global
+ ; starte groß geschriebene römische Zahlen, verwende U2160++
+ PressHookProc := "Roman"
+ RomanMode := 1
+ RomanSum := 0
+}
+
+CharProcRom2() {
+ global
+ ; starte klein geschriebene römische Zahlen, verwende U2160++
+ PressHookProc := "Roman"
+ RomanMode := 2
+ RomanSum := 0
+}
+
+CharProcRom3() {
+ global
+ ; starte groß geschriebene römische Zahlen, verwende Buchstaben
+ PressHookProc := "Roman"
+ RomanMode := 3
+ RomanSum := 0
+}
+
+CharProcRom4() {
+ global
+ ; starte klein geschriebene römische Zahlen, verwende Buchstaben
+ PressHookProc := "Roman"
+ RomanMode := 4
+ RomanSum := 0
+}
+
+GenRomanDigit(Pos, DigitIs, DigitTest, str0, str1, str2, str3, str4, str5) {
+ res := ""
+ if (DigitIs == DigitTest)
+ res := str%Pos%
+ return res
+}
+
+PressHookRoman(PhysKey, ActKey, Char) {
+ global
+ if ((Char == "U0030") or (Char == "SN__0"))
+ RomanSum := 10*RomanSum
+ else if ((Char == "U0031") or (Char == "SN__1"))
+ RomanSum := 10*RomanSum + 1
+ else if ((Char == "U0032") or (Char == "SN__2"))
+ RomanSum := 10*RomanSum + 2
+ else if ((Char == "U0033") or (Char == "SN__3"))
+ RomanSum := 10*RomanSum + 3
+ else if ((Char == "U0034") or (Char == "SN__4"))
+ RomanSum := 10*RomanSum + 4
+ else if ((Char == "U0035") or (Char == "SN__5"))
+ RomanSum := 10*RomanSum + 5
+ else if ((Char == "U0036") or (Char == "SN__6"))
+ RomanSum := 10*RomanSum + 6
+ else if ((Char == "U0037") or (Char == "SN__7"))
+ RomanSum := 10*RomanSum + 7
+ else if ((Char == "U0038") or (Char == "SN__8"))
+ RomanSum := 10*RomanSum + 8
+ else if ((Char == "U0039") or (Char == "SN__9"))
+ RomanSum := 10*RomanSum + 9
+ else if ((Char == "U000D") or (Char == "U0020")) {
+ RomanSum := mod(RomanSum,400000)
+ RomanStr := ""
+ RomanPos := 0
+ if (RomanMode == 1)
+ loop {
+ RomanDigit := mod(RomanSum,10)
+ RomanSum := RomanSum//10
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,1,"U2170","U2179","U217D","U217F","U2182","U2188") . RomanStr
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,2,"U2170U2170","U2179U2179","U217DU217D","U217FU217F","U2182U2182","U2188U2188") . RomanStr
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,3,"U2170U2170U2170","U2179U2179U2179","U217DU217DU217D","U217FU217FU217F","U2182U2182U2182","U2188U2188U2188") . RomanStr
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,4,"U2170U2174","U2179U217C","U217DU217E","U2180U2181","U2182U2187","") . RomanStr
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,5,"U2174","U217C","U217E","U2181","U2187","") . RomanStr
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,6,"U2174U2170","U217CU2179","U217EU217D","U2181U2180","U2187U2182","") . RomanStr
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,7,"U2174U2170U2170","U217CU2179U2179","U217EU217DU217D","U2181U2180U2180","U2187U2182U2182","") . RomanStr
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,8,"U2174U2170U2170U2170","U217CU2179U2179U2179","U217EU217DU217DU217D","U2181U2180U2180U2180","U2187U2182U2182U2182","") . RomanStr
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,9,"U2178","U2179U217D","U217DU217F","U2180U2182","U2182U2188","") . RomanStr
+ if (RomanSum == 0)
+ break
+ RomanPos := RomanPos + 1
+ }
+ else if (RomanMode == 2)
+ loop {
+ RomanDigit := mod(RomanSum,10)
+ RomanSum := RomanSum//10
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,1,"U2160","U2169","U216D","U216F","U2182","U2188") . RomanStr
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,2,"U2160U2160","U2169U2169","U216DU216D","U216FU216F","U2182U2182","U2188U2188") . RomanStr
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,3,"U2160U2160U2160","U2169U2169U2169","U216DU216DU216D","U216FU216FU216F","U2182U2182U2182","U2188U2188U2188") . RomanStr
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,4,"U2160U2164","U2169U216C","U216DU216E","U2180U2181","U2182U2187","") . RomanStr
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,5,"U2164","U216C","U216E","U2181","U2187","") . RomanStr
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,6,"U2164U2160","U216CU2169","U216EU216D","U2181U2180","U2187U2182","") . RomanStr
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,7,"U2164U2160U2160","U216CU2169U2169","U216EU216DU216D","U2181U2180U2180","U2187U2182U2182","") . RomanStr
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,8,"U2164U2160U2160U2160","U216CU2169U2169U2169","U216EU216DU216DU216D","U2181U2180U2180U2180","U2187U2182U2182U2182","") . RomanStr
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,9,"U2160U2169","U2169U216D","U216DU216F","U2180U2182","U2182U2188","") . RomanStr
+ if (RomanSum == 0)
+ break
+ RomanPos := RomanPos + 1
+ }
+ else if (RomanMode == 3)
+ loop {
+ RomanDigit := mod(RomanSum,10)
+ RomanSum := RomanSum//10
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,1,"U0069","U0078","U0063","U006D","","") . RomanStr
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,2,"U0069U0069","U0078U0078","U0063U0063","U006DU006D","","") . RomanStr
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,3,"U0069U0069U0069","U0078U0078U0078","U0063U0063U0063","U006DU006DU006D","","") . RomanStr
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,4,"U0069U0076","U0078U006C","U0063U0064","","","") . RomanStr
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,5,"U0076","U006C","U0064","","","") . RomanStr
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,6,"U0076U0069","U006CU0078","U0064U0063","","","") . RomanStr
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,7,"U0076U0069U0069","U006CU0078U0078","U0064U0063U0063","","","") . RomanStr
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,8,"U0076U0069U0069U0069","U006CU0078U0078U0078","U0064U0063U0063U0063","","","") . RomanStr
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,9,"U0069U0078","U0078U0063","U0063U006D","","","") . RomanStr
+ if (RomanSum == 0)
+ break
+ RomanPos := RomanPos + 1
+ }
+ else if (RomanMode == 4)
+ loop {
+ RomanDigit := mod(RomanSum,10)
+ RomanSum := RomanSum//10
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,1,"U0049","U0058","U0043","U004D","","") . RomanStr
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,2,"U0049U0049","U0058U0058","U0043U0043","U004DU004D","","") . RomanStr
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,3,"U0049U0049U0049","U0058U0058U0058","U0043U0043U0043","U004DU004DU004D","","") . RomanStr
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,4,"U0049U0056","U0058U004C","U0043U0044","","","") . RomanStr
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,5,"U0056","U004C","U0044","","","") . RomanStr
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,6,"U0056U0049","U004CU0058","U0044U0043","","","") . RomanStr
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,7,"U0056U0049U0049","U004CU0058U0058","U0044U0043U0043","","","") . RomanStr
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,8,"U0056U0049U0049U0049","U004CU0058U0058U0058","U0044U0043U0043U0043","","","") . RomanStr
+ RomanStr := GenRomanDigit(RomanPos,RomanDigit,9,"U0049U0058","U0058U0043","U0043U004D","","","") . RomanStr
+ if (RomanSum == 0)
+ break
+ RomanPos := RomanPos + 1
+ }
+ loop {
+ if (RomanStr == "")
+ break ; erledigt
+ CharOut(SubStr(RomanStr,1,5))
+ RomanStr := SubStr(RomanStr,6)
+ }
+ PressHookProc := ""
+ } else
+ PressHookProc := ""
+}
+
+CMSCompU0075 := 1
+CMSCompU0055 := 1
+CDSCompU0075U0075 := "P_Uni"
+CDSCompU0075U0055 := "P_Uni"
+CDSCompU0055U0075 := "P_Uni"
+CDSCompU0055U0055 := "P_Uni"
+CMSCompU0064 := 1
+CMSCompU0044 := 1
+CDSCompU0064U0064 := "PDUni"
+CDSCompU0064U0044 := "PDUni"
+CDSCompU0044U0064 := "PDUni"
+CDSCompU0044U0044 := "PDUni"
+
+CP5VK41SC01E := "P_Uni"
+
+CharProc_Uni() {
+ global
+ ; starte Unicode-Hex-in-Zeichen-Umwandlung
+ PressHookProc := "Uni"
+ UniSum := ""
+}
+
+CharProcDUni() {
+ global
+ ; starte Unicode-Zeichen-in-Hex-Umwandlung
+ CharOutFilterProc := "DUni"
+}
+
+PressHookUni(PhysKey, ActKey, Char) {
+ global
+ if ((Char == "U0030") or (Char == "SN__0"))
+ UniSum := UniSum . "0"
+ else if ((Char == "U0031") or (Char == "SN__1"))
+ UniSum := UniSum . "1"
+ else if ((Char == "U0032") or (Char == "SN__2"))
+ UniSum := UniSum . "2"
+ else if ((Char == "U0033") or (Char == "SN__3"))
+ UniSum := UniSum . "3"
+ else if ((Char == "U0034") or (Char == "SN__4"))
+ UniSum := UniSum . "4"
+ else if ((Char == "U0035") or (Char == "SN__5"))
+ UniSum := UniSum . "5"
+ else if ((Char == "U0036") or (Char == "SN__6"))
+ UniSum := UniSum . "6"
+ else if ((Char == "U0037") or (Char == "SN__7"))
+ UniSum := UniSum . "7"
+ else if ((Char == "U0038") or (Char == "SN__8"))
+ UniSum := UniSum . "8"
+ else if ((Char == "U0039") or (Char == "SN__9"))
+ UniSum := UniSum . "9"
+ else if ((Char == "U0041") or (Char == "U0061"))
+ UniSum := UniSum . "A"
+ else if ((Char == "U0042") or (Char == "U0062"))
+ UniSum := UniSum . "B"
+ else if ((Char == "U0043") or (Char == "U0063"))
+ UniSum := UniSum . "C"
+ else if ((Char == "U0044") or (Char == "U0064"))
+ UniSum := UniSum . "D"
+ else if ((Char == "U0045") or (Char == "U0065"))
+ UniSum := UniSum . "E"
+ else if ((Char == "U0046") or (Char == "U0066"))
+ UniSum := UniSum . "F"
+ else if ((Char == "U000D") or (Char == "U0020")) {
+ UniSum := "U" . SubStr("0000" . UniSum, -3)
+ PP%PhysKey% := UniSum
+ PR%PhysKey% := UniSum
+ CharOutDown(UniSum)
+ PressHookProc := ""
+ } else
+ PressHookProc := ""
+}
+
+CharOutFilterDUni(char,down,up) {
+ global
+ if (!down)
+ return char
+ CharOutFilterProc := ""
+ TrayTip,Unicode-Zeichen,%char%,10,1
+ return char
+}
+
+EncodeUni(str) {
+SetFormat, Integer, hex
+; MsgBox % Asc(SubStr(str,1,1)) . Asc(SubStr(str,2,1))
+ result := ""
+ loop {
+ char := SubStr(str,1,1)
+ str := SubStr(str,2)
+ if (asc(char) < 0x80)
+ result := result . "U00" . SubStr(asc(char),3)
+ else if (asc(char) < 0xC0) {
+ ; error
+ } else if (asc(char) < 0xE0) {
+ char2 := Substr(str,1,1)
+ str := SubStr(str,2)
+ if ((asc(char2) < 0x80) or (asc(char2) > 0xBF)) {
+ ; error
+ } else {
+ result := result . "U" . SubStr("0000" . SubStr((((asc(char) & 0x1F) << 6) + (asc(char2) & 0x3F)),3),-3)
+ }
+ } else if (asc(char) < 0xF8) {
+ char2 := SubStr(str,1,1)
+ char3 := SubStr(str,2,1)
+ str := SubStr(str,3)
+; MsgBox % "chars: " . char . ", " . char2 . ", " . char3 . ", str: " . str
+ if ((asc(char2) < 0x80) or (asc(char2) > 0xBF)
+ or (asc(char3) < 0x80) or (asc(char3) > 0xBF)) {
+ ; error
+ } else {
+; MsgBox % asc(char) . asc(char2) . asc(char3)
+; MsgBox % (((asc(char) & 0x0F) << 12) + ((asc(char2) & 0x3F) << 6) + (asc(char3) & 0x3F))
+ result := result . "U" . SubStr("0000" . SubStr((((asc(char) & 0x0F) << 12) + ((asc(char2) & 0x3F) << 6) + (asc(char3) & 0x3F)),3),-3)
+ }
+ }
+ if (str == "")
+ break
+ }
+ SetFormat, Integer, d
+ StringUpper,result,result
+ return result
+}
diff --git a/windows/neo-vars/src/source/varsfunctions.ahk b/windows/neo-vars/src/source/varsfunctions.ahk index ba4912b..5983f83 100644 --- a/windows/neo-vars/src/source/varsfunctions.ahk +++ b/windows/neo-vars/src/source/varsfunctions.ahk @@ -10,7 +10,10 @@ AllStar(This_HotKey) { IsDown := 0
} else
IsDown := 1
- ActKey := TransformKey(PhysKey)
+ if (TransformProc != "")
+ ActKey := Transform%TransformProc%(PhysKey)
+ else
+ ActKey := PhysKey
if ((striktesMod2Lock == 0) && (NOC%ActKey% == 1))
Ebene := EbeneNC
else
@@ -21,9 +24,9 @@ AllStar(This_HotKey) { Char := CP8%ActKey%
else
Char := CP%Ebene%%ActKey%
- if (IsPressHooked == 1) {
+ if (PressHookProc != "") {
if (IsDown == 1)
- PressHookProc(PressHookRoutine, PhysKey, ActKey, Char)
+ PressHook%PressHookProc%(PhysKey, ActKey, Char)
else
CharStarUp(PhysKey)
} else if (IsDown == 1)
@@ -67,7 +70,8 @@ CharStarDown(PhysKey, ActKey, char) { loop {
if (SubStr(tosend,1,1)=="P") {
- CharProc(SubStr(tosend,2,4))
+ SubProc := SubStr(tosend,2,4)
+ CharProc%SubProc%()
} else {
CharOut(SubStr(tosend,1,5))
}
@@ -81,7 +85,8 @@ CharStarDown(PhysKey, ActKey, char) { CharOutUp(PR%PhysKey%)
PR%PhysKey% := ""
}
- CharProc(SubStr(tosend,2))
+ SubProc := SubStr(tosend,2,4)
+ CharProc%SubProc%()
} else {
if ((PR%PhysKey% != "") and (PR%PhysKey% != tosend))
CharOutUp(PR%PhysKey%)
@@ -99,9 +104,10 @@ CharStarUp(PhysKey) { if (PR%PhysKey% != "") {
tosend := PR%PhysKey%
PR%PhysKey% := ""
- if (SubStr(tosend,1,1)=="P")
- CharProc(SubStr(tosend,2))
- else
+ if (SubStr(tosend,1,1)=="P") {
+ SubProc := SubStr(tosend,2,4)
+ CharProc%SubProc%()
+ } else
CharOutUp(tosend)
}
PP%PhysKey% := ""
@@ -110,9 +116,10 @@ CharStarUp(PhysKey) { CharOut(char) {
global
- if (DecodeUnicodeNext == 1) {
- DecodeUnicodeNext := 0
- TrayTip,Unicode-Zeichen,%char%,10,1
+ if (CharOutFilterProc != "") {
+ char := CharOutFilter%CharOutFilterProc%(char,1,1)
+ if (char == "")
+ return
}
if (DNCS%char% != "")
SendBlindShiftFixed(char, DNCS%char% . UPCS%char%)
@@ -124,9 +131,10 @@ CharOut(char) { CharOutDown(char) {
global
- if (DecodeUnicodeNext == 1) {
- DecodeUnicodeNext := 0
- TrayTip,Unicode-Zeichen,%char%,10,1
+ if (CharOutFilterProc != "") {
+ char := CharOutFilter%CharOutFilterProc%(char,1,0)
+ if (char == "")
+ return
}
if (DNCS%char% != "")
SendBlindShiftFixed(char, DNCS%char%)
@@ -138,6 +146,11 @@ CharOutDown(char) { CharOutUp(char) {
global
+ if (CharOutFilterProc != "") {
+ char := CharOutFilter%CharOutFilterProc%(char,0,1)
+ if (char == "")
+ return
+ }
if (DNCS%char% != "") {
if (UPCS%char% != "")
SendBlindShiftFixed(char, UPCS%char%)
@@ -164,438 +177,14 @@ SendBlindShiftFixed(char, theseq) { send % "{blind}" . theseq
}
-CharProc(subroutine) {
- global
- if (subroutine == "_Rom") {
- ; starte groß geschriebene römische Zahlen
- IsPressHooked := 1
- PressHookRoutine := "Roman"
- RomanSum := 0
- } else if (subroutine == "_rom") {
- ; starte klein geschriebene römische Zahlen
- IsPressHooked := 1
- PressHookRoutine := "roman"
- RomanSum := 0
- } else if (subroutine == "_Uni") {
- ; starte Unicode-Hex-in-Zeichen-Umwandlung
- IsPressHooked := 1
- PressHookRoutine := "Uni"
- UniSum := ""
- } else if (subroutine == "DUni") {
- ; starte Unicode-Zeichen-in-Hex-Umwandlung
- DecodeUnicodeNext := 1
- } else if (subroutine == "Rlod") {
- ; Neustart des AHK-Skripts
- reload
- } else if (subroutine == "LnSt") {
- ;Lang-s-Tastatur: Toggle
- LangSTastatur := !(LangSTastatur)
- if (LangSTastatur) {
- CharProc("LnS1")
- if (zeigeModusBox)
- TrayTip,Lange-s-Tastatur,Die Lang-S-Belegungsvariante wurde aktiviert. Zum Deaktivieren`, Mod3+F11 drücken.,10,1
- } else {
- CharProc("LnS0")
- if (zeigeModusBox)
- TrayTip,Lange-s-Tastatur,Lang-S-Belegungsvariante wurde deaktiviert.,10,1
- }
- } else if (subroutine == "LnS1") {
- ; Lange-s-Tastatur aktivieren
- ED("VKBASC01A",1,"U0073","U1E9E","U00DF","" ,"U03C2","U2218") ; ß
- ED("VK48SC023",1,"U017F","U0053","U003F","U00BF","U03C3","U03A3") ; s
- KeyboardLED(2,"on")
- } else if (subroutine == "LnS0") {
- ; Lange-s-Tastatur deaktivieren
- ED("VKBASC01A",1,"U00DF","U1E9E","U017F","" ,"U03C2","U2218") ; ß
- ED("VK48SC023",1,"U0073","U0053","U003F","U00BF","U03C3","U03A3") ; s
- KeyboardLED(2,"off")
- if (zeigeModusBox)
- TrayTip,Lange-s-Tastatur,Die Lange-s-Belegungsvariante wurde aktiviert. Zum Deaktivieren`, Mod3+F11 drücken.,10,1
- } else if (subroutine == "_VMt") {
- ; VM-Tastaturbelegungsvariante togglen
- ; Belegungsvariante VM
- isVM := !(isVM)
- if (isVM) {
- CharProc("_VM1")
- if (zeigeModusBox)
- TrayTip,NEO-VM-Belegungsvariante,Die VM-Belegungsvariante wurde aktiviert. Zum Deaktivieren`, Mod3+F12 drücken.,10,1
- } else {
- CharProc("_VM0")
- if (zeigeModusBox)
- TrayTip,NEO-VM-Belegungsvariante,NEO-VM wurde deaktiviert.,10,1
- }
- } else if (subroutine == "_VM1") {
- ; VM-Tastaturbelegungsvariante aktivieren
- ED("VK51SC010",1,"U0079","U0059","U2026","U22EE","U03C5","U2207") ; y
- ED("VK57SC011",1,"U006F","U004F","U005F","U0008","U03BF","U2208") ; o
- ED("VK45SC012",1,"U0061","U0041","U005B","S__Up","U03B1","U2200") ; a
- ED("VK52SC013",1,"U0070","U0050","U005D","S_Del","U03C0","U03A0") ; p
- ED("VK41SC01E",1,"U0069","U0049","U005C","SHome","U03B9","U222B") ; i
- ED("VK53SC01F",1,"U0075","U0055","U002F","SLeft","P_Uni","U222E") ; u
- ED("VK44SC020",1,"U0065","U0045","U007B","SDown","U03B5","U2203") ; e
- ED("VK46SC021",1,"U0063","U0043","U007D","SRght","U03C7","U2102") ; c
- ED("VK47SC022",1,"U006C","U004C","U002A","S_End","U03BB","U039B") ; l
- ED("VKDESC028",1,"U0078","U0058","U0040","U002E","U03BE","U039E") ; x
- ED("VK56SC02F",1,"U0076","U0056","U007E","U000D","" ,"U2259") ; v
- ED("VK34SC005",0,"U0034","U00AB","U2039","SPgUp","U2020","U22A5") ; 4
- ED("VK35SC006",0,"U0035","U00BB","U203A","U00B7","U2640","U2221") ; 5
- } else if (subroutine == "_VM0") {
- ; VM-Tastaturbelegungsvariante deaktivieren
- ED("VK51SC010",1,"U0078","U0058","U2026","U22EE","U03BE","U039E") ; x
- ED("VK57SC011",1,"U0076","U0056","U005F","U0008","" ,"U2259") ; v
- ED("VK45SC012",1,"U006C","U004C","U005B","S__Up","U03BB","U039B") ; l
- ED("VK52SC013",1,"U0063","U0043","U005D","S_Del","U03C7","U2102") ; c
- ED("VK41SC01E",1,"U0075","U0055","U005C","SHome","P_Uni","U222E") ; u
- ED("VK53SC01F",1,"U0069","U0049","U002F","SLeft","U03B9","U222B") ; i
- ED("VK44SC020",1,"U0061","U0041","U007B","SDown","U03B1","U2200") ; a
- ED("VK46SC021",1,"U0065","U0045","U007D","SRght","U03B5","U2203") ; e
- ED("VK47SC022",1,"U006F","U004F","U002A","S_End","U03BF","U2208") ; o
- ED("VKDESC028",1,"U0079","U0059","U0040","U002E","U03C5","U2207") ; y
- ED("VK56SC02F",1,"U0070","U0050","U007E","U000D","U03C0","U03A0") ; p
- ED("VK34SC005",0,"U0034","U00BB","U203A","SPgUp","U2020","U22A5") ; 4
- ED("VK35SC006",0,"U0035","U00AB","U2039","U00B7","U2640","U2221") ; 5
- } else if (subroutine == "_EHt") {
- ; Einhandmodus togglen
- einHandNeo := !(einHandNeo)
- if (einHandNeo) {
- CharProc("_EH1")
- if (zeigeModusBox)
- TrayTip,NEO-Einhandmodus,Der NEO-Einhand-Modus wurde aktiviert. Zum Deaktivieren Mod3+F10 drücken.,10,1
- } else {
- CharProc("_EH0")
- if (zeigeModusBox)
- TrayTip,NEO-Einhand-Modus,Der Einhandmodus wurde deaktiviert.,10,1
- }
- } else if (subroutine == "_EH1") {
- ; Einhand-NEO aktivieren
- ; Funktionstasten
- TKEH_F7 := "F6" ; F7 -> F6
- TKEH_F8 := "F5" ; F8 -> F5
- TKEH_F9 := "F4" ; F9 -> F4
- TKEH_F10 := "F3" ; F10 -> F3
- TKEH_F11 := "F2" ; F11 -> F2
- TKEH_F12 := "F1" ; F12 -> F1
- ; Reihe 1
- TKEH_VK37SC008 := "VK36SC007" ; 7 -> 6
- TKEH_VK38SC009 := "VK35SC006" ; 8 -> 5
- TKEH_VK39SC00A := "VK34SC005" ; 9 -> 4
- TKEH_VK30SC00B := "VK33SC004" ; 0 -> 3
- TKEH_VKDBSC00C := "VK32SC003" ; ß -> 2
- TKEH_VKDDSC00D := "VK31SC002" ; tot2 -> 1
- ; Reihe 2
- TKEH_VK5ASC015 := "VK54SC014" ; k -> w
- TKEH_VK55SC016 := "VK52SC013" ; h -> c
- TKEH_VK49SC017 := "VK45SC012" ; g -> l
- TKEH_VK4FSC018 := "VK57SC011" ; f -> v
- TKEH_VK50SC019 := "VK51SC010" ; q -> x
- TKEH_VKBASC01A := "tab" ; ß -> tab
- TKEH_VKBBSC01B := "VKDCSC029" ; tot3 -> tot1
- ; Reihe 3
- TKEH_VK48SC023 := "VK47SC022" ; s -> o
- TKEH_VK4ASC024 := "VK46SC021" ; n -> e
- TKEH_VK4BSC025 := "VK44SC020" ; r -> a
- TKEH_VK4CSC026 := "VK53SC01F" ; t -> i
- TKEH_VKC0SC027 := "VK41SC01E" ; d -> u
- ; Reihe 4
- TKEH_VK4ESC031 := "VK42SC030" ; b -> z
- TKEH_VK4DSC032 := "VK56SC02F" ; m -> p
- TKEH_VKBCSC033 := "VK43SC02E" ; , -> ä
- TKEH_VKBESC034 := "VK58SC02D" ; . -> ö
- TKEH_VKBDSC035 := "VK59SC02C" ; j -> ü
- ; Modify Space
- ED1("space","PEHSd")
- ED("EHSpace",0,"U0020","U0020","U0020","SN__0","U00A0","U202F")
- } else if (subroutine == "_EH0") {
- ; Einhand-NEO deaktivieren
- ; Funktionstasten
- TKEH_F7 := "" ; F7
- TKEH_F8 := "" ; F8
- TKEH_F9 := "" ; F9
- TKEH_F10 := "" ; F10
- TKEH_F11 := "" ; F11
- TKEH_F12 := "" ; F12
- ; Reihe 1
- TKEH_VK37SC008 := "" ; 7
- TKEH_VK38SC009 := "" ; 8
- TKEH_VK39SC00A := "" ; 9
- TKEH_VK30SC00B := "" ; 0
- TKEH_VKDBSC00C := "" ; ß
- TKEH_VKDDSC00D := "" ; tot2
- ; Reihe 2
- TKEH_VK5ASC015 := "" ; k
- TKEH_VK55SC016 := "" ; h
- TKEH_VK49SC017 := "" ; g
- TKEH_VK4FSC018 := "" ; f
- TKEH_VK50SC019 := "" ; q
- TKEH_VKBASC01A := "" ; ß
- TKEH_VKBBSC01B := "" ; tot3
- ; Reihe 3
- TKEH_VK48SC023 := "" ; s
- TKEH_VK4ASC024 := "" ; n
- TKEH_VK4BSC025 := "" ; r
- TKEH_VK4CSC026 := "" ; t
- TKEH_VKC0SC027 := "" ; d
- ; Reihe 4
- TKEH_VK4ESC031 := "" ; b
- TKEH_VK4DSC032 := "" ; m
- TKEH_VKBCSC033 := "" ; ,
- TKEH_VKBESC034 := "" ; .
- TKEH_VKBDSC035 := "" ; j
- ED("space",0,"U0020","U0020","U0020","SN__0","U00A0","U202F")
- } else if (subroutine == "EHSd") {
- ; Space im Einhandmodus gedrückt
- EHSpacePressed := 1
- PRspace := "PEHSu"
- } else if (subroutine == "EHSu") {
- ; Space im Einhandmodus losgelassen
- if (!EHKeyPressed) {
- AllStar("*EHSpace")
- AllStar("*EHSpace up")
- }
- EHKeyPressed := 0
- EHSpacePressed := 0
- } else if (subroutine == "_LMt") {
- ; Lernmodus togglen
- lernModus := !(lernModus)
- if (lernModus) {
- CharProc("_LM1")
- if (zeigeModusBox)
- TrayTip,NEO-Lernmodus,NEO-Lernmodus wurde aktiviert. Zum Deaktivieren`, Mod3+F9 drücken.,10,1
- } else {
- CharProc("_LM0")
- if (zeigeModusBox)
- TrayTip,NEO-Lernmodus,Lernmodus wurde deaktiviert.,10,1
- }
- } else if (subroutine == "_LM1") {
- ; Lernmodus aktivieren
- if (!lernModus_std_Return)
- ED1("enter","")
- if (!lernModus_std_Backspace)
- ED1("backspace","")
- if (!lernModus_std_PgUp)
- ED1("pgup","")
- if (!lernModus_std_PgDn)
- ED1("pgdn","")
- if (!lernModus_std_Einf)
- ED1("ins","")
- if (!lernModus_std_Entf)
- ED1("del","")
- if (!lernModus_std_Pos0)
- ED1("home","")
- if (!lernModus_std_Ende)
- ED1("end","")
- if (!lernModus_std_Hoch)
- ED1("up","")
- if (!lernModus_std_Runter)
- ED1("down","")
- if (!lernModus_std_Links)
- ED1("left","")
- if (!lernModus_std_Rechts)
- ED1("right","")
- if (!lernModus_neo_Backspace)
- CP4VK57SC011 := "" ; Ebene 4 unter v (QWERTZ: w)
- if (!lernModus_neo_Entf)
- CP4VK52SC013 := "" ; Ebene 4 unter c (QWERTZ: r)
- } else if (subroutine == "_LM0") {
- ; Lernmodus deaktivieren
- ED1("enter" ,"U000D")
- ED1("backspace","U0008")
- ED1("pgup" ,"SPgUp")
- ED1("pgdn" ,"SPgDn")
- ED1("ins" ,"S_Ins")
- ED1("del" ,"S_Del")
- ED1("home" ,"SHome")
- ED1("end" ,"S_End")
- ED1("up" ,"S__Up")
- ED1("down" ,"SDown")
- ED1("left" ,"SLeft")
- ED1("right" ,"SRght")
- CP4VK57SC011 := "U0008"
- CP4VK52SC013 := "S_Del"
- } else if (subroutine == "M2LT") {
- ; Mod2Lock Toggle
- ToggleMod2Lock()
- EbeneAktualisieren()
- } else if (subroutine == "BSTt") {
- ; Bildschirmtastatur Ein/Aus
- BSTToggle()
- } else if (subroutine == "BSTA") {
- ; Bildschirmtastatur AlwaysOnTop
- if (guiErstellt)
- BSTToggleAlwaysOnTop()
- }
+CharProc(name) {
+ CharProc%name%()
}
-PressHookProc(HookRoutine, PhysKey, ActKey, Char) {
+CharProcRlod() {
global
- if ((HookRoutine == "Roman") or (HookRoutine == "roman")) {
- if ((Char == "U0030") or (Char == "SN__0"))
- RomanSum := 10*RomanSum
- else if ((Char == "U0031") or (Char == "SN__1"))
- RomanSum := 10*RomanSum + 1
- else if ((Char == "U0032") or (Char == "SN__2"))
- RomanSum := 10*RomanSum + 2
- else if ((Char == "U0033") or (Char == "SN__3"))
- RomanSum := 10*RomanSum + 3
- else if ((Char == "U0034") or (Char == "SN__4"))
- RomanSum := 10*RomanSum + 4
- else if ((Char == "U0035") or (Char == "SN__5"))
- RomanSum := 10*RomanSum + 5
- else if ((Char == "U0036") or (Char == "SN__6"))
- RomanSum := 10*RomanSum + 6
- else if ((Char == "U0037") or (Char == "SN__7"))
- RomanSum := 10*RomanSum + 7
- else if ((Char == "U0038") or (Char == "SN__8"))
- RomanSum := 10*RomanSum + 8
- else if ((Char == "U0039") or (Char == "SN__9"))
- RomanSum := 10*RomanSum + 9
- else if ((Char == "U000D") or (Char == "U0020")) {
- RomanSum := mod(RomanSum,400000)
- RomanStr := ""
- RomanPos := 0
- if (HookRoutine == "Roman")
- loop {
- RomanDigit := mod(RomanSum,10)
- RomanSum := RomanSum//10
- RomanStr := GenRomanDigit(RomanPos,RomanDigit,1,"U2160","U2169","U216D","U216F","U2182","U2188") . RomanStr
- RomanStr := GenRomanDigit(RomanPos,RomanDigit,2,"U2160U2160","U2169U2169","U216DU216D","U216FU216F","U2182U2182","U2188U2188") . RomanStr
- RomanStr := GenRomanDigit(RomanPos,RomanDigit,3,"U2160U2160U2160","U2169U2169U2169","U216DU216DU216D","U216FU216FU216F","U2182U2182U2182","U2188U2188U2188") . RomanStr
- RomanStr := GenRomanDigit(RomanPos,RomanDigit,4,"U2160U2164","U2169U216C","U216DU216E","U2180U2181","U2182U2187","") . RomanStr
- RomanStr := GenRomanDigit(RomanPos,RomanDigit,5,"U2164","U216C","U216E","U2181","U2187","") . RomanStr
- RomanStr := GenRomanDigit(RomanPos,RomanDigit,6,"U2164U2160","U216CU2169","U216EU216D","U2181U2180","U2187U2182","") . RomanStr
- RomanStr := GenRomanDigit(RomanPos,RomanDigit,7,"U2164U2160U2160","U216CU2169U2169","U216EU216DU216D","U2181U2180U2180","U2187U2182U2182","") . RomanStr
- RomanStr := GenRomanDigit(RomanPos,RomanDigit,8,"U2164U2160U2160U2160","U216CU2169U2169U2169","U216EU216DU216DU216D","U2181U2180U2180U2180","U2187U2182U2182U2182","") . RomanStr
- RomanStr := GenRomanDigit(RomanPos,RomanDigit,9,"U2160U2169","U2169U216D","U216DU216F","U2180U2182","U2182U2188","") . RomanStr
- if (RomanSum == 0)
- break
- RomanPos := RomanPos + 1
- }
- else
- loop {
- RomanDigit := mod(RomanSum,10)
- RomanSum := RomanSum//10
- RomanStr := GenRomanDigit(RomanPos,RomanDigit,1,"U2170","U2179","U217D","U217F","U2182","U2188") . RomanStr
- RomanStr := GenRomanDigit(RomanPos,RomanDigit,2,"U2170U2170","U2179U2179","U217DU217D","U217FU217F","U2182U2182","U2188U2188") . RomanStr
- RomanStr := GenRomanDigit(RomanPos,RomanDigit,3,"U2170U2170U2170","U2179U2179U2179","U217DU217DU217D","U217FU217FU217F","U2182U2182U2182","U2188U2188U2188") . RomanStr
- RomanStr := GenRomanDigit(RomanPos,RomanDigit,4,"U2170U2174","U2179U217C","U217DU217E","U2180U2181","U2182U2187","") . RomanStr
- RomanStr := GenRomanDigit(RomanPos,RomanDigit,5,"U2174","U217C","U217E","U2181","U2187","") . RomanStr
- RomanStr := GenRomanDigit(RomanPos,RomanDigit,6,"U2174U2170","U217CU2179","U217EU217D","U2181U2180","U2187U2182","") . RomanStr
- RomanStr := GenRomanDigit(RomanPos,RomanDigit,7,"U2174U2170U2170","U217CU2179U2179","U217EU217DU217D","U2181U2180U2180","U2187U2182U2182","") . RomanStr
- RomanStr := GenRomanDigit(RomanPos,RomanDigit,8,"U2174U2170U2170U2170","U217CU2179U2179U2179","U217EU217DU217DU217D","U2181U2180U2180U2180","U2187U2182U2182U2182","") . RomanStr
- RomanStr := GenRomanDigit(RomanPos,RomanDigit,9,"U2178","U2179U217D","U217DU217F","U2180U2182","U2182U2188","") . RomanStr
- if (RomanSum == 0)
- break
- RomanPos := RomanPos + 1
- }
- loop {
- if (RomanStr == "")
- break ; erledigt
- CharOut(SubStr(RomanStr,1,5))
- RomanStr := SubStr(RomanStr,6)
- }
- IsPressHooked := 0
- } else
- IsPressHooked := 0
- } else if (HookRoutine == "Uni") {
- if ((Char == "U0030") or (Char == "SN__0"))
- UniSum := UniSum . "0"
- else if ((Char == "U0031") or (Char == "SN__1"))
- UniSum := UniSum . "1"
- else if ((Char == "U0032") or (Char == "SN__2"))
- UniSum := UniSum . "2"
- else if ((Char == "U0033") or (Char == "SN__3"))
- UniSum := UniSum . "3"
- else if ((Char == "U0034") or (Char == "SN__4"))
- UniSum := UniSum . "4"
- else if ((Char == "U0035") or (Char == "SN__5"))
- UniSum := UniSum . "5"
- else if ((Char == "U0036") or (Char == "SN__6"))
- UniSum := UniSum . "6"
- else if ((Char == "U0037") or (Char == "SN__7"))
- UniSum := UniSum . "7"
- else if ((Char == "U0038") or (Char == "SN__8"))
- UniSum := UniSum . "8"
- else if ((Char == "U0039") or (Char == "SN__9"))
- UniSum := UniSum . "9"
- else if ((Char == "U0041") or (Char == "U0061"))
- UniSum := UniSum . "A"
- else if ((Char == "U0042") or (Char == "U0062"))
- UniSum := UniSum . "B"
- else if ((Char == "U0043") or (Char == "U0063"))
- UniSum := UniSum . "C"
- else if ((Char == "U0044") or (Char == "U0064"))
- UniSum := UniSum . "D"
- else if ((Char == "U0045") or (Char == "U0065"))
- UniSum := UniSum . "E"
- else if ((Char == "U0046") or (Char == "U0066"))
- UniSum := UniSum . "F"
- else if ((Char == "U000D") or (Char == "U0020")) {
- UniSum := "U" . SubStr("0000" . UniSum, -3)
- PP%PhysKey% := UniSum
- PR%PhysKey% := UniSum
- CharOutDown(UniSum)
- IsPressHooked := 0
- } else
- IsPressHooked := 0
- } else
- IsPressHooked := 0
-}
-
-GenRomanDigit(Pos, DigitIs, DigitTest, str0, str1, str2, str3, str4, str5) {
- res := ""
- if (DigitIs == DigitTest)
- res := str%Pos%
- return res
-}
-
-EncodeUni(str) {
-SetFormat, Integer, hex
-; MsgBox % Asc(SubStr(str,1,1)) . Asc(SubStr(str,2,1))
- result := ""
- loop {
- char := SubStr(str,1,1)
- str := SubStr(str,2)
- if (asc(char) < 0x80)
- result := result . "U00" . SubStr(asc(char),3)
- else if (asc(char) < 0xC0) {
- ; error
- } else if (asc(char) < 0xE0) {
- char2 := Substr(str,1,1)
- str := SubStr(str,2)
- if ((asc(char2) < 0x80) or (asc(char2) > 0xBF)) {
- ; error
- } else {
- result := result . "U" . SubStr("0000" . SubStr((((asc(char) & 0x1F) << 6) + (asc(char2) & 0x3F)),3),-3)
- }
- } else if (asc(char) < 0xF8) {
- char2 := SubStr(str,1,1)
- char3 := SubStr(str,2,1)
- str := SubStr(str,3)
-; MsgBox % "chars: " . char . ", " . char2 . ", " . char3 . ", str: " . str
- if ((asc(char2) < 0x80) or (asc(char2) > 0xBF)
- or (asc(char3) < 0x80) or (asc(char3) > 0xBF)) {
- ; error
- } else {
-; MsgBox % asc(char) . asc(char2) . asc(char3)
-; MsgBox % (((asc(char) & 0x0F) << 12) + ((asc(char2) & 0x3F) << 6) + (asc(char3) & 0x3F))
- result := result . "U" . SubStr("0000" . SubStr((((asc(char) & 0x0F) << 12) + ((asc(char2) & 0x3F) << 6) + (asc(char3) & 0x3F)),3),-3)
- }
- }
- if (str == "")
- break
- }
- SetFormat, Integer, d
- StringUpper,result,result
- return result
-}
-
-TransformKey(PhysKey) {
- global
- if (einHandNeo and EHSpacePressed and (TKEH_%PhysKey% != "")) {
- EHKeyPressed := 1
- return TKEH_%PhysKey%
- }
- return PhysKey
+ ; Neustart des AHK-Skripts
+ reload
}
SendUnicodeChar(charCode){
|