git-svn-id: https://svn.neo-layout.org@1186 b9310e46-f624-0410-8ea1-cfbb3a30dc96
This commit is contained in:
parent
4380d659fc
commit
fe102c86d5
19 changed files with 12855 additions and 0 deletions
1
windows/neo-vars/src/Source/_subwcrev1.tmpl.ahk
Normal file
1
windows/neo-vars/src/Source/_subwcrev1.tmpl.ahk
Normal file
|
@ -0,0 +1 @@
|
|||
Revision:="$WCREV$$WCMODS?M:$$WCMIXED?X:$"
|
1
windows/neo-vars/src/Source/_subwcrev1.tmpl.bat
Normal file
1
windows/neo-vars/src/Source/_subwcrev1.tmpl.bat
Normal file
|
@ -0,0 +1 @@
|
|||
set Revision=$WCREV$$WCMODS?M:$$WCMIXED?X:$
|
1
windows/neo-vars/src/Source/_subwcrev2.tmpl.bat
Normal file
1
windows/neo-vars/src/Source/_subwcrev2.tmpl.bat
Normal file
|
@ -0,0 +1 @@
|
|||
set CompRevision=$WCREV$$WCMODS?M:$$WCMIXED?X:$
|
8285
windows/neo-vars/src/Source/compose.generated.ahk_
Normal file
8285
windows/neo-vars/src/Source/compose.generated.ahk_
Normal file
File diff suppressed because it is too large
Load diff
81
windows/neo-vars/src/Source/initialize.ahk
Normal file
81
windows/neo-vars/src/Source/initialize.ahk
Normal file
|
@ -0,0 +1,81 @@
|
|||
name=Neo 2.0 r%Revision%-r%CompRevision% (%A_ScriptName%)
|
||||
enable=Aktiviere %name%
|
||||
disable=Deaktiviere %name%
|
||||
#LTrim ; Quelltext kann eingerückt werden
|
||||
|
||||
SetCapsLockState Off
|
||||
SetNumLockState Off
|
||||
SetScrollLockState Off
|
||||
|
||||
EnvGet, WindowsEnvAppDataFolder, APPDATA
|
||||
ApplicationFolder = %WindowsEnvAppDataFolder%\NEO2
|
||||
FileCreateDir, %ApplicationFolder%
|
||||
ini = %ApplicationFolder%\NEO2.ini
|
||||
|
||||
bildschirmTastaturEinbinden := 1
|
||||
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
|
||||
regread,inputlocalealias,HKEY_CURRENT_USER,Keyboard Layout\Substitutes,%inputlocale%
|
||||
if (inputlocalealias<>inputlocale=%inputlocalealias% and inputlocale<>00000407) {
|
||||
suspend
|
||||
regread,inputlocale,HKEY_LOCAL_MACHINE,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\%inputlocale%,Layout Text
|
||||
msgbox, 48, Warnung!,
|
||||
(
|
||||
Nicht kompatibles Tastaturlayout:
|
||||
`t%inputlocale%
|
||||
`nDas deutsche QWERTZ muss als Standardlayout eingestellt
|
||||
sein, damit %name% wie erwartet funktioniert.
|
||||
`nÄndern Sie die Tastatureinstellung unter
|
||||
`tSystemsteuerung
|
||||
`t-> Regions- und Sprachoptionen
|
||||
`t-> Sprachen
|
||||
`t-> Details... `n
|
||||
)
|
||||
exitapp
|
||||
}
|
||||
guiErstellt := 0
|
||||
alwaysOnTop := 1
|
||||
wasNonShiftKeyPressed := 0
|
||||
isShiftRPressed := 0
|
||||
isShiftLPressed := 0
|
||||
isShiftPressed := 0
|
||||
isMod2Locked := 0
|
||||
IsMod3RPressed := 0
|
||||
IsMod3LPressed := 0
|
||||
IsMod3Pressed := 0
|
||||
IsMod4RPressed := 0
|
||||
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
|
||||
|
87
windows/neo-vars/src/Source/keyboardleds.ahk
Normal file
87
windows/neo-vars/src/Source/keyboardleds.ahk
Normal file
|
@ -0,0 +1,87 @@
|
|||
;ScrollLock=1, NumLock=2, CapsLock=4, bzw. eine beliebige Summe dieser Werte
|
||||
KeyboardLED(LEDvalue, Cmd){ ; LEDvalue: ScrollLock=1, NumLock=2, CapsLock=4 ; Cmd = on/off/switch
|
||||
Static h_device
|
||||
If ! h_device ; initialise
|
||||
{
|
||||
device=\Device\KeyBoardClass0
|
||||
SetUnicodeStrLED(fn,device)
|
||||
h_device:=NtCreateFileLED(fn,0+0x00000100+0x00000080+0x00100000,1,1,0x00000040+0x00000020,0)
|
||||
}
|
||||
VarSetCapacity(output_actual,4,0)
|
||||
input_size=4
|
||||
VarSetCapacity(input,input_size,0)
|
||||
If Cmd=switch ;switches every LED according to LEDvalue
|
||||
KeyLED:=LEDvalue
|
||||
If Cmd=on ;forces all choosen LED's to ON (LEDvalue= 0 ->LED's according to keystate)
|
||||
KeyLED:=LEDvalue | (GetKeyState("ScrollLock", "T") + 2*GetKeyState("NumLock", "T") + 4*GetKeyState("CapsLock", "T"))
|
||||
If Cmd=off ;forces all choosen LED's to OFF (LEDvalue= 0 ->LED's according to keystate)
|
||||
{
|
||||
LEDvalue:=LEDvalue ^ 7
|
||||
KeyLED:=LEDvalue & (GetKeyState("ScrollLock","T") + 2*GetKeyState("NumLock","T") + 4*GetKeyState("CapsLock","T"))
|
||||
}
|
||||
; EncodeIntegerLED(KeyLED,1,&input,2) ;input bit pattern (KeyLED): bit 0 = scrolllock ;bit 1 = numlock ;bit 2 = capslock
|
||||
input:=Chr(1) Chr(1) Chr(KeyLED)
|
||||
input:=Chr(1)
|
||||
input=
|
||||
success:=DllCall("DeviceIoControl"
|
||||
, "uint", h_device
|
||||
, "uint", CTL_CODE_LED( 0x0000000b ; FILE_DEVICE_KEYBOARD
|
||||
, 2
|
||||
, 0 ; METHOD_BUFFERED
|
||||
, 0 ) ; FILE_ANY_ACCESS
|
||||
, "uint", &input
|
||||
, "uint", input_size
|
||||
, "uint", 0
|
||||
, "uint", 0
|
||||
, "uint", &output_actual
|
||||
, "uint", 0 )
|
||||
}
|
||||
|
||||
CTL_CODE_LED(p_device_type,p_function,p_method,p_access ){
|
||||
Return, ( p_device_type << 16 ) | ( p_access << 14 ) | ( p_function << 2 ) | p_method
|
||||
}
|
||||
|
||||
NtCreateFileLED(ByRef wfilename,desiredaccess,sharemode,createdist,flags,fattribs){
|
||||
VarSetCapacity(fh,4,0)
|
||||
VarSetCapacity(objattrib,24,0)
|
||||
VarSetCapacity(io,8,0)
|
||||
VarSetCapacity(pus,8)
|
||||
uslen:=DllCall("lstrlenW","str",wfilename)*2
|
||||
InsertIntegerLED(uslen,pus,0,2)
|
||||
InsertIntegerLED(uslen,pus,2,2)
|
||||
InsertIntegerLED(&wfilename,pus,4)
|
||||
InsertIntegerLED(24,objattrib,0)
|
||||
InsertIntegerLED(&pus,objattrib,8)
|
||||
status:=DllCall("ntdll\ZwCreateFile","str",fh,"UInt",desiredaccess,"str",objattrib,"str",io,"UInt",0,"UInt",fattribs
|
||||
,"UInt",sharemode,"UInt",createdist,"UInt",flags,"UInt",0,"UInt",0, "UInt")
|
||||
return ExtractIntegerLED(fh)
|
||||
}
|
||||
|
||||
SetUnicodeStrLED(ByRef out, str_){
|
||||
VarSetCapacity(st1, 8, 0)
|
||||
InsertIntegerLED(0x530025, st1)
|
||||
VarSetCapacity(out, (StrLen(str_)+1)*2, 0)
|
||||
DllCall("wsprintfW", "str", out, "str", st1, "str", str_, "Cdecl UInt")
|
||||
}
|
||||
|
||||
ExtractIntegerLED(ByRef pSource, pOffset = 0, pIsSigned = false, pSize = 4){
|
||||
; pSource is a string (buffer) whose memory area contains a raw/binary integer at pOffset.
|
||||
; The caller should pass true for pSigned to interpret the result as signed vs. unsigned.
|
||||
; pSize is the size of PSource's integer in bytes (e.g. 4 bytes for a DWORD or Int).
|
||||
; pSource must be ByRef to avoid corruption during the formal-to-actual copying process
|
||||
; (since pSource might contain valid data beyond its first binary zero).
|
||||
Loop %pSize% ; Build the integer by adding up its bytes.
|
||||
result += *(&pSource + pOffset + A_Index-1) << 8*(A_Index-1)
|
||||
if (!pIsSigned OR pSize > 4 OR result < 0x80000000)
|
||||
return result ; Signed vs. unsigned doesn't matter in these cases.
|
||||
; Otherwise, convert the value (now known to be 32-bit) to its signed counterpart:
|
||||
return -(0xFFFFFFFF - result + 1)
|
||||
}
|
||||
|
||||
InsertIntegerLED(pInteger, ByRef pDest, pOffset = 0, pSize = 4){
|
||||
; The caller must ensure that pDest has sufficient capacity. To preserve any existing contents in pDest,
|
||||
; only pSize number of bytes starting at pOffset are altered in it.
|
||||
Loop %pSize% ; Copy each byte in the integer into the structure as raw binary data.
|
||||
DllCall("RtlFillMemory", "UInt", &pDest + pOffset + A_Index-1, "UInt", 1, "UChar", pInteger >> 8*(A_Index-1) & 0xFF)
|
||||
}
|
||||
|
124
windows/neo-vars/src/Source/keydefinitions.ahk
Normal file
124
windows/neo-vars/src/Source/keydefinitions.ahk
Normal file
|
@ -0,0 +1,124 @@
|
|||
; KeyCode Ebene1 Ebene2 Ebene3 Ebene4 Ebene5 Ebene6 Ebene7* Ebene8*
|
||||
; Reihe 1
|
||||
ED("VKDCSC029",0,"Tcflx","Ttlde","Tobrg","Tcron","Tbrve","Tmcrn") ; circumflex
|
||||
ED("VK31SC002",0,"U0031","U00B0","U00B9","U00BA","U2081","U00AC") ; 1
|
||||
ED("VK32SC003",0,"U0032","U00A7","U00B2","U00AA","U2082","U2228") ; 2
|
||||
ED("VK33SC004",0,"U0033","U2113","U00B3","U2116","U2083","U2227") ; 3
|
||||
ED("VK34SC005",0,"U0034","U00BB","U203A","SPgUp","U2020","U22A5") ; 4
|
||||
ED("VK35SC006",0,"U0035","U00AB","U2039","U00B7","U2640","U2221") ; 5
|
||||
ED("VK36SC007",0,"U0036","U20AC","U00A2","U00A3","U2642","U2225") ; 6
|
||||
ED("VK37SC008",0,"U0037","U0024","U00A5","U00A4","U03BA","U2209") ; 7
|
||||
ED("VK38SC009",0,"U0038","U201E","U201A","SNDiv","U27E8","U2204") ; 8
|
||||
ED("VK39SC00A",0,"U0039","U201C","U2018","SNMul","U27E9","U2226") ; 9
|
||||
ED("VK30SC00B",0,"U0030","U201D","U2019","SNSub","U2080","U2205") ; 0
|
||||
ED("VKDBSC00C",0,"U002D","U2013","U2014","" ,"U2011","U00AD") ; -
|
||||
ED("VKDDSC00D",0,"Tgrav","" ,"Tdrss","Tdgrv","U1FFE","" ) ; grave
|
||||
; Reihe 2
|
||||
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("VK54SC014",1,"U0077","U0057","U005E","S_Ins","U03C9","U03A9") ; w
|
||||
ED("VK5ASC015",1,"U006B","U004B","U0021","U00A1","U03F0","U221A") ; k
|
||||
ED("VK55SC016",1,"U0068","U0048","U003C","SN__7","U03C8","U03A8") ; h
|
||||
ED("VK49SC017",1,"U0067","U0047","U003E","SN__8","U03B3","U0393") ; g
|
||||
ED("VK4FSC018",1,"U0066","U0046","U003D","SN__9","U03C6","U03A6") ; f
|
||||
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("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("VK48SC023",1,"U0073","U0053","U003F","U00BF","U03C3","U03A3") ; s
|
||||
ED("VK4ASC024",1,"U006E","U004E","U0028","SN__4","U03BD","U2115") ; n
|
||||
ED("VK4BSC025",1,"U0072","U0052","U0029","SN__5","U03F1","U211D") ; r
|
||||
ED("VK4CSC026",1,"U0074","U0054","U002D","SN__6","U03C4","U2202") ; t
|
||||
ED("VKC0SC027",1,"U0064","U0044","U003A","SNDot","U03B4","U0394") ; d
|
||||
ED("VKDESC028",1,"U0079","U0059","U0040","U002E","U03C5","U2207") ; y
|
||||
; Reihe 4
|
||||
ED("VK59SC02C",1,"U00FC","U00DC","U0023","U001B","" ,"U221C") ; ü
|
||||
ED("VK58SC02D",1,"U00F6","U00D6","U0024","U0009","" ,"U2111") ; ö
|
||||
ED("VK43SC02E",1,"U00E4","U00C4","U007C","SPgDn","U03B7","U2135") ; ä
|
||||
ED("VK56SC02F",1,"U0070","U0050","U007E","U000D","U03C0","U03A0") ; p
|
||||
ED("VK42SC030",1,"U007A","U005A","U0060","" ,"U03B6","U2124") ; z
|
||||
ED("VK4ESC031",1,"U0062","U0042","U002B","U003A","U03B2","U21D0") ; b
|
||||
ED("VK4DSC032",1,"U006D","U004D","U0025","SN__1","U03BC","U21D4") ; m
|
||||
ED("VKBCSC033",0,"U002C","U2022","U0022","SN__2","U03C1","U21D2") ; ,
|
||||
ED("VKBESC034",0,"U002E","U2023","U0027","SN__3","U03D1","U0398") ; .
|
||||
ED("VKBDSC035",1,"U006A","U004A","U003B","U003B","U03B8","U221D") ; j
|
||||
|
||||
; Numpad
|
||||
ED("VK90SC145",0,"U0009","U0009","U003D","U2260","U2248","U2261") ; NumLock
|
||||
ED("VK6FSC135",0,"SNDiv","SNDiv","U00F7","U2300","U2223","U2044") ; NumpadDiv
|
||||
ED("VK6ASC037",0,"SNMul","SNMul","U22C5","U00D7","U2299","U2297") ; NumpadMult
|
||||
ED("VK6DSC04A",0,"SNSub","SNSub","U2212","U2216","U2296","U2238") ; NumpadSub
|
||||
ED("VK6BSC04E",0,"SNAdd","SNAdd","U00B1","U2213","U2295","U2214") ; NumpadAdd
|
||||
|
||||
EDN("VK67SC047","VK24SC047",0,"SN__7","U2714","U2195","SNHom","U226A","U2308") ; Numpad7, NumpadHome
|
||||
EDN("VK68SC048","VK26SC048",0,"SN__8","U2718","U2191","SN_Up","U2229","U22C2") ; Numpad8, NumpadUp
|
||||
EDN("VK69SC049","VK21SC049",0,"SN__9","" ,"U20D7","SNPUp","U226B","U2309") ; Numpad9, NumpadPgUp
|
||||
|
||||
EDN("VK64SC04B","VK25SC04B",0,"SN__4","U2663","U2190","SN_Le","U2282","U2286") ; Numpad4, NumpadLeft
|
||||
EDN("VK65SC04C","VK0CSC04C",0,"SN__5","U20AC","U00A6","SNClr","U22B6","U22B7") ; Numpad5, NumpadClear
|
||||
EDN("VK66SC04D","VK27SC04D",0,"SN__6","" ,"U2192","SN_Ri","U2283","U2287") ; Numpad6, NumpadRight
|
||||
|
||||
EDN("VK61SC04F","VK23SC04F",0,"SN__1","U2666","U2194","SNEnd","U2264","U230A") ; Numpad1, NumpadEnd
|
||||
EDN("VK62SC050","VK28SC050",0,"SN__2","U2665","U2193","SN_Dn","U222A","U22C3") ; Numpad2, NumpadDown
|
||||
EDN("VK63SC051","VK22SC051",0,"SN__3","U2660","U21CC","SNPDn","U2265","U230B") ; Numpad3, NumpadPgDn
|
||||
|
||||
EDN("VK60SC052","VK2DSC052",0,"SN__0","U2423","U0025","SNIns","U2030","U25A1") ; Numpad0, NumpadIns
|
||||
EDN("VK6ESC053","VK2ESC053",0,"SNDot","U002E","U002C","SNDel","U2032","U2033") ; NumpadDot, NumpadDel
|
||||
|
||||
; other chars
|
||||
ED("space",0,"U0020","U0020","U0020","SN__0","U00A0","U202F")
|
||||
ED("esc" ,0,"U001B","U001B","U001B","PRlod","U001B","U001B")
|
||||
ED("tab" ,0,"U0009","U0009","SComp","U0009","PM2LT","U0009")
|
||||
ED("F9" ,0,"S__F9","S__F9","" ,"P_LMt","" ,"")
|
||||
ED("F10" ,0,"S_F10","S_F10","" ,"P_EHt","" ,"")
|
||||
ED("F11" ,0,"S_F11","S_F11","" ,"PLnSt","" ,"")
|
||||
ED("F12" ,0,"S_F10","S_F10","" ,"P_VMt","" ,"")
|
||||
ED1("enter" ,"U000D")
|
||||
ED1("backspace","U0008")
|
||||
ED1("del" ,"S_Del")
|
||||
ED1("ins" ,"S_Ins")
|
||||
ED1("home" ,"SHome")
|
||||
ED1("end" ,"S_End")
|
||||
ED1("pgup" ,"SPgUp")
|
||||
ED1("pgdn" ,"SPgDn")
|
||||
ED1("up" ,"S__Up")
|
||||
ED1("down" ,"SDown")
|
||||
ED1("left" ,"SLeft")
|
||||
ED1("right" ,"SRght")
|
||||
ED1("numpadenter","SNEnt")
|
||||
|
||||
ED(pos,caps,e1,e2,e3,e4,e5,e6,e7="",e8="") {
|
||||
global
|
||||
if (caps == 0)
|
||||
NOC%pos% := 1
|
||||
else {
|
||||
if (e1 != "")
|
||||
UNSH%e1% := 1 ; unshift wenn caps lock + Shift?
|
||||
}
|
||||
CP1%pos% := e1
|
||||
CP2%pos% := e2
|
||||
CP3%pos% := e3
|
||||
CP4%pos% := e4
|
||||
CP5%pos% := e5
|
||||
CP6%pos% := e6
|
||||
CP7%pos% := e7
|
||||
CP8%pos% := e8
|
||||
}
|
||||
|
||||
EDN(pos1,pos2,caps,e1,e2,e3,e4,e5,e6) {
|
||||
ED(pos1,caps,e1,e2,e3,e4,e5,e6)
|
||||
ED(pos2,caps,e1,e2,e3,e4,e5,e6)
|
||||
}
|
||||
|
||||
ED1(pos,e1) {
|
||||
ED(pos,0,e1,e1,e1,e1,e1,e1)
|
||||
}
|
||||
|
||||
Comp := ""
|
328
windows/neo-vars/src/Source/keyhooks.ahk
Normal file
328
windows/neo-vars/src/Source/keyhooks.ahk
Normal file
|
@ -0,0 +1,328 @@
|
|||
~F24::return
|
||||
|
||||
+pause::
|
||||
Suspend, Permit
|
||||
goto togglesuspend
|
||||
|
||||
~*VKA1SC136::
|
||||
if (isShiftLPressed and !isShiftRPressed and !wasNonShiftKeyPressed)
|
||||
ToggleMod2Lock()
|
||||
isShiftRPressed := 1
|
||||
isShiftPressed := 1
|
||||
wasNonShiftKeyPressed := 0
|
||||
EbeneAktualisieren()
|
||||
return
|
||||
|
||||
~*VKA1SC136 up::
|
||||
isShiftRPressed := 0
|
||||
isShiftPressed := isShiftLPressed
|
||||
EbeneAktualisieren()
|
||||
return
|
||||
|
||||
~*VKA0SC02A::
|
||||
if (isShiftRPressed and !isShiftLPressed and !wasNonShiftKeyPressed)
|
||||
ToggleMod2Lock()
|
||||
isShiftLPressed := 1
|
||||
isShiftPressed := 1
|
||||
wasNonShiftKeyPressed := 0
|
||||
EbeneAktualisieren()
|
||||
return
|
||||
|
||||
~*VKA0SC02A up::
|
||||
isShiftLPressed := 0
|
||||
isShiftPressed := isShiftRPressed
|
||||
EbeneAktualisieren()
|
||||
return
|
||||
|
||||
*VKBFSC02B::
|
||||
if (isMod3LPressed and !isMod3RPressed and !wasNonShiftKeyPressed)
|
||||
CharStarDown("MOD3", "MOD3", "SComp")
|
||||
isMod3RPressed := 1
|
||||
isMod3Pressed := 1
|
||||
wasNonShiftKeyPressed := 0
|
||||
EbeneAktualisieren()
|
||||
return
|
||||
|
||||
*VKBFSC02B up::
|
||||
if (isMod3LPressed)
|
||||
CharStarUp("MOD3")
|
||||
isMod3RPressed := 0
|
||||
isMod3Pressed := isMod3LPressed
|
||||
EbeneAktualisieren()
|
||||
return
|
||||
|
||||
*VK14SC03A::
|
||||
if (isMod3RPressed and !isMod3LPressed and !wasNonShiftKeyPressed)
|
||||
CharStarDown("MOD3", "MOD3", "SComp")
|
||||
isMod3LPressed := 1
|
||||
isMod3Pressed := 1
|
||||
wasNonShiftKeyPressed := 0
|
||||
EbeneAktualisieren()
|
||||
return
|
||||
|
||||
*VK14SC03A up::
|
||||
if (isMod3RPressed)
|
||||
CharStarUp("MOD3")
|
||||
isMod3LPressed := 0
|
||||
isMod3Pressed := isMod3RPressed
|
||||
EbeneAktualisieren()
|
||||
return
|
||||
|
||||
*VKA5SC138::
|
||||
wasMod4RPressed := isMod4RPressed
|
||||
isMod4RPressed := 1
|
||||
isMod4Pressed := 1
|
||||
waswasNonShiftKeyPressed := wasNonShiftKeyPressed
|
||||
wasNonShiftKeyPressed := 0
|
||||
EbeneAktualisieren()
|
||||
if (isMod4LPressed and !wasMod4RPressed and !waswasNonShiftKeyPressed)
|
||||
ToggleMod4Lock()
|
||||
return
|
||||
|
||||
*VKA5SC138 up::
|
||||
isMod4RPressed := 0
|
||||
isMod4Pressed := isMod4LPressed
|
||||
EbeneAktualisieren()
|
||||
return
|
||||
|
||||
*VKE2SC056::
|
||||
wasMod4LPressed := isMod4LPressed
|
||||
isMod4LPressed := 1
|
||||
isMod4Pressed := 1
|
||||
waswasNonShiftKeyPressed := wasNonShiftKeyPressed
|
||||
wasNonShiftKeyPressed := 0
|
||||
EbeneAktualisieren()
|
||||
if (isMod4RPressed and !wasMod4LPressed and !waswasNonShiftKeyPressed)
|
||||
ToggleMod4Lock()
|
||||
return
|
||||
|
||||
*VKE2SC056 up::
|
||||
isMod4LPressed := 0
|
||||
isMod4Pressed := isMod4RPressed
|
||||
EbeneAktualisieren()
|
||||
return
|
||||
|
||||
|
||||
|
||||
;;;;;; DOWN EVENTS
|
||||
; Reihe 1
|
||||
|
||||
*VKDCSC029:: ; Zirkumflex
|
||||
*VK31SC002:: ; 1
|
||||
*VK32SC003:: ; 2
|
||||
*VK33SC004:: ; 3
|
||||
*VK34SC005:: ; 4
|
||||
*VK35SC006:: ; 5
|
||||
*VK36SC007:: ; 6
|
||||
*VK37SC008:: ; 7
|
||||
*VK38SC009:: ; 8
|
||||
*VK39SC00A:: ; 9
|
||||
*VK30SC00B:: ; 0
|
||||
*VKDBSC00C:: ; ß
|
||||
*VKDDSC00D:: ; Akut
|
||||
|
||||
; Reihe 2
|
||||
|
||||
*VK51SC010:: ; q (x)
|
||||
*VK57SC011:: ; w (v)x
|
||||
*VK45SC012:: ; e (l)
|
||||
*VK52SC013:: ; r (c)
|
||||
*VK54SC014:: ; t (w)
|
||||
*VK5ASC015:: ; z (k)
|
||||
*VK55SC016:: ; u (h)
|
||||
*VK49SC017:: ; i (g)
|
||||
*VK4FSC018:: ; o (f)
|
||||
*VK50SC019:: ; p (q)
|
||||
*VKBASC01A:: ; ü (ß)
|
||||
*VKBBSC01B:: ; + (tot3)
|
||||
|
||||
; Reihe 3
|
||||
|
||||
*VK41SC01E:: ; a (u)
|
||||
*VK53SC01F:: ; s (i)
|
||||
*VK44SC020:: ; d (a)
|
||||
*VK46SC021:: ; f (e)
|
||||
*VK47SC022:: ; g (o)
|
||||
*VK48SC023:: ; h (s)
|
||||
*VK4ASC024:: ; j (n)
|
||||
*VK4BSC025:: ; k (r)
|
||||
*VK4CSC026:: ; l (t)
|
||||
*VKC0SC027:: ; ö (d)
|
||||
*VKDESC028:: ; ä (y)
|
||||
|
||||
; Reihe 4
|
||||
|
||||
*VK59SC02C:: ; y (ü)
|
||||
*VK58SC02D:: ; x (ö)
|
||||
*VK43SC02E:: ; c (ä)
|
||||
*VK56SC02F:: ; v (p)
|
||||
*VK42SC030:: ; b (z)
|
||||
*VK4ESC031:: ; n (b)
|
||||
*VK4DSC032:: ; m (m)
|
||||
*VKBCSC033:: ; , (,)
|
||||
*VKBESC034:: ; . (.)
|
||||
*VKBDSC035:: ; - (j)
|
||||
*space::
|
||||
|
||||
; Numpad
|
||||
|
||||
*VK90SC145:: ; NumLock
|
||||
*VK6FSC135:: ; NumpadDiv
|
||||
*VK6ASC037:: ; NumpadMult
|
||||
*VK6DSC04A:: ; NumpadSub
|
||||
*VK6BSC04E:: ; NumpadAdd
|
||||
; *VK0DSC11C:: ; NumpadEnter
|
||||
*VK67SC047:: ; NumPad7
|
||||
*VK24SC047:: ; NumPadHome
|
||||
*VK68SC048:: ; NumPad8
|
||||
*VK26SC048:: ; NumPadUp
|
||||
*VK69SC049:: ; NumPad9
|
||||
*VK21SC049:: ; NumPadPgUp
|
||||
*VK64SC04B:: ; NumPad4
|
||||
*VK25SC04B:: ; NumPadLeft
|
||||
*VK65SC04C:: ; NumPad5
|
||||
*VK0CSC04C:: ; NumPadClear
|
||||
*VK66SC04D:: ; NumPad6
|
||||
*VK27SC04D:: ; NumPadRight
|
||||
*VK61SC04F:: ; NumPad1
|
||||
*VK23SC04F:: ; NumPadEnd
|
||||
*VK62SC050:: ; NumPad2
|
||||
*VK28SC050:: ; NumPadDown
|
||||
*VK63SC051:: ; NumPad3
|
||||
*VK22SC051:: ; NumPadPgDn
|
||||
*VK60SC052:: ; NumPad0
|
||||
*VK2DSC052:: ; NumPadIns
|
||||
*VK6ESC053:: ; NumPadDot
|
||||
*VK2ESC053:: ; NumPadDel
|
||||
tab::
|
||||
esc::
|
||||
*enter::
|
||||
*backspace::
|
||||
*del::
|
||||
*ins::
|
||||
*home::
|
||||
*end::
|
||||
*pgup::
|
||||
*pgdn::
|
||||
*up::
|
||||
*down::
|
||||
*left::
|
||||
*right::
|
||||
F9::
|
||||
F10::
|
||||
F11::
|
||||
F12::
|
||||
numpadenter::
|
||||
|
||||
;;;;;; UP EVENTS
|
||||
; Reihe 1
|
||||
|
||||
*VKDCSC029 up:: ; Zirkumflex
|
||||
*VK31SC002 up:: ; 1
|
||||
*VK32SC003 up:: ; 2
|
||||
*VK33SC004 up:: ; 3
|
||||
*VK34SC005 up:: ; 4
|
||||
*VK35SC006 up:: ; 5
|
||||
*VK36SC007 up:: ; 6
|
||||
*VK37SC008 up:: ; 7
|
||||
*VK38SC009 up:: ; 8
|
||||
*VK39SC00A up:: ; 9
|
||||
*VK30SC00B up:: ; 0
|
||||
*VKDBSC00C up:: ; ß
|
||||
*VKDDSC00D up:: ; Akut
|
||||
|
||||
; Reihe 2
|
||||
|
||||
*VK51SC010 up:: ; q (x)
|
||||
*VK57SC011 up:: ; w (v)x
|
||||
*VK45SC012 up:: ; e (l)
|
||||
*VK52SC013 up:: ; r (c)
|
||||
*VK54SC014 up:: ; t (w)
|
||||
*VK5ASC015 up:: ; z (k)
|
||||
*VK55SC016 up:: ; u (h)
|
||||
*VK49SC017 up:: ; i (g)
|
||||
*VK4FSC018 up:: ; o (f)
|
||||
*VK50SC019 up:: ; p (q)
|
||||
*VKBASC01A up:: ; ü (ß)
|
||||
*VKBBSC01B up:: ; + (tot3)
|
||||
|
||||
; Reihe 3
|
||||
|
||||
*VK41SC01E up:: ; a (u)
|
||||
*VK53SC01F up:: ; s (i)
|
||||
*VK44SC020 up:: ; d (a)
|
||||
*VK46SC021 up:: ; f (e)
|
||||
*VK47SC022 up:: ; g (o)
|
||||
*VK48SC023 up:: ; h (s)
|
||||
*VK4ASC024 up:: ; j (n)
|
||||
*VK4BSC025 up:: ; k (r)
|
||||
*VK4CSC026 up:: ; l (t)
|
||||
*VKC0SC027 up:: ; ö (d)
|
||||
*VKDESC028 up:: ; ä (y)
|
||||
|
||||
; Reihe 4
|
||||
|
||||
*VK59SC02C up:: ; y (ü)
|
||||
*VK58SC02D up:: ; x (ö)
|
||||
*VK43SC02E up:: ; c (ä)
|
||||
*VK56SC02F up:: ; v (p)
|
||||
*VK42SC030 up:: ; b (z)
|
||||
*VK4ESC031 up:: ; n (b)
|
||||
*VK4DSC032 up:: ; m (m)
|
||||
*VKBCSC033 up:: ; , (,)
|
||||
*VKBESC034 up:: ; . (.)
|
||||
*VKBDSC035 up:: ; - (j)
|
||||
*space up::
|
||||
|
||||
; Numpad
|
||||
|
||||
*VK90SC145 up:: ; NumLock
|
||||
*VK6FSC135 up:: ; NumpadDiv
|
||||
*VK6ASC037 up:: ; NumpadMult
|
||||
*VK6DSC04A up:: ; NumpadSub
|
||||
*VK6BSC04E up:: ; NumpadAdd
|
||||
; *VK0DSC11C up:: ; NumpadEnter
|
||||
*VK67SC047 up:: ; NumPad7
|
||||
*VK24SC047 up:: ; NumPadHome
|
||||
*VK68SC048 up:: ; NumPad8
|
||||
*VK26SC048 up:: ; NumPadUp
|
||||
*VK69SC049 up:: ; NumPad9
|
||||
*VK21SC049 up:: ; NumPadPgUp
|
||||
*VK64SC04B up:: ; NumPad4
|
||||
*VK25SC04B up:: ; NumPadLeft
|
||||
*VK65SC04C up:: ; NumPad5
|
||||
*VK0CSC04C up:: ; NumPadClear
|
||||
*VK66SC04D up:: ; NumPad6
|
||||
*VK27SC04D up:: ; NumPadRight
|
||||
*VK61SC04F up:: ; NumPad1
|
||||
*VK23SC04F up:: ; NumPadEnd
|
||||
*VK62SC050 up:: ; NumPad2
|
||||
*VK28SC050 up:: ; NumPadDown
|
||||
*VK63SC051 up:: ; NumPad3
|
||||
*VK22SC051 up:: ; NumPadPgDn
|
||||
*VK60SC052 up:: ; NumPad0
|
||||
*VK2DSC052 up:: ; NumPadIns
|
||||
*VK6ESC053 up:: ; NumPadDot
|
||||
*VK2ESC053 up:: ; NumPadDel
|
||||
tab up::
|
||||
esc up::
|
||||
*enter up::
|
||||
*backspace up::
|
||||
*del up::
|
||||
*ins up::
|
||||
*home up::
|
||||
*end up::
|
||||
*pgup up::
|
||||
*pgdn up::
|
||||
*up up::
|
||||
*down up::
|
||||
*left up::
|
||||
*right up::
|
||||
F9 up::
|
||||
F10 up::
|
||||
F11 up::
|
||||
F12 up::
|
||||
numpadenter up::
|
||||
|
||||
AllStar(A_ThisHotkey)
|
||||
return
|
98
windows/neo-vars/src/Source/levelfunctions.ahk
Normal file
98
windows/neo-vars/src/Source/levelfunctions.ahk
Normal file
|
@ -0,0 +1,98 @@
|
|||
EbeneAktualisieren() {
|
||||
global
|
||||
Modstate := IsMod4Active() . IsMod3Active()
|
||||
Ebene7 := 0
|
||||
Ebene8 := 0
|
||||
if (Modstate == "00") { ; Ebene 1 oder 2
|
||||
if (IsShiftActive()) ; Ebene 2: Shift oder CapsLock
|
||||
EbeneC := 2
|
||||
else ; Ebene 1: Ohne Mod oder CapsLock mit Shift
|
||||
EbeneC := 1
|
||||
if (IsShiftPressed) ; NC: Ebene 2: Shift (ignoriert CapsLock)
|
||||
EbeneNC := 2
|
||||
else ; NC: Ebene 1: Ohne Mod (ignoriert CapsLock)
|
||||
EbeneNC := 1
|
||||
} else if (Modstate == "01") { ; Ebene 3 oder 5 (ignoriert CapsLock)
|
||||
if (IsShiftPressed) ; Ebene 5: Shift+Mod3
|
||||
EbeneC := 5
|
||||
else ; Ebene 3: Mod3
|
||||
EbeneC := 3
|
||||
EbeneNC := EbeneC ; NC: gleich
|
||||
} else if (Modstate == "10") { ; Ebene 4 (Mit Shift: Auch Ebene 7) (ignoriert CapsLock)
|
||||
EbeneC := 4
|
||||
if (IsShiftPressed) ; Ebene 7: Shift+Mod4
|
||||
Ebene7 := 1
|
||||
EbeneNC := EbeneC ; NC: gleich
|
||||
} else if (ModState == "11") { ; Ebene 6 (Mit Shift Xoder CapsLock: Auch Ebene 8)
|
||||
EbeneC := 6
|
||||
if (IsShiftPressed) ; Ebene 8: Shift (ignoriert CapsLock)
|
||||
Ebene8 := 1
|
||||
EbeneNC := EbeneC ; NC: gleich
|
||||
}
|
||||
}
|
||||
|
||||
IsShiftActive() {
|
||||
global
|
||||
if (isMod2Locked)
|
||||
if (isShiftPressed)
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
else
|
||||
if (isShiftPressed)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
}
|
||||
|
||||
IsMod3Active() {
|
||||
global
|
||||
return isMod3Pressed
|
||||
}
|
||||
|
||||
IsMod4Active() {
|
||||
global
|
||||
if (isMod4Locked)
|
||||
if (isMod4Pressed)
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
else
|
||||
if (isMod4Pressed)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
}
|
||||
|
||||
ToggleMod2Lock() {
|
||||
global
|
||||
if (isMod2Locked)
|
||||
{
|
||||
isMod2Locked := 0
|
||||
KeyboardLED(4,"off")
|
||||
}
|
||||
else
|
||||
{
|
||||
isMod2Locked := 1
|
||||
KeyBoardLED(4,"on")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ToggleMod4Lock() {
|
||||
global
|
||||
if (IsMod4Locked) {
|
||||
IsMod4Locked := 0
|
||||
if (UseMod4Light)
|
||||
KeyboardLED(1,"off")
|
||||
if (zeigeLockBox)
|
||||
TrayTip,Mod4-Feststellung,Die Feststellung wurde aufgehoben.,3,1
|
||||
} else {
|
||||
IsMod4Locked := 1
|
||||
if (UseMod4Light)
|
||||
KeyboardLED(1,"on")
|
||||
if (zeigeLockBox)
|
||||
TrayTip,Mod4-Feststellung,Um Mod4 wieder zu lösen`, drücke beide Mod4-Tasten gleichzeitig!,3,1
|
||||
}
|
||||
}
|
||||
|
1925
windows/neo-vars/src/Source/makecompose.ahk
Normal file
1925
windows/neo-vars/src/Source/makecompose.ahk
Normal file
File diff suppressed because it is too large
Load diff
49
windows/neo-vars/src/Source/neovarscompose.ahk
Normal file
49
windows/neo-vars/src/Source/neovarscompose.ahk
Normal file
|
@ -0,0 +1,49 @@
|
|||
/*
|
||||
CM* == 1: Await more compose chars after this sequence?
|
||||
CD* : Replace compose sequence by this character
|
||||
CPx* : Key press for * in Ebene x
|
||||
CPNx* : Key press for numpad * in Ebene x
|
||||
CS* : shortcut to output instead of *
|
||||
PP* : repeat code for key *
|
||||
PR* : release code for key *
|
||||
*/
|
||||
|
||||
; ein wenig COMPOSE
|
||||
CMSCompU002D := 1
|
||||
CDSCompU002DSLeft := "U2190"
|
||||
CDSCompU002DS__Up := "U2191"
|
||||
CDSCompU002DSRght := "U2192"
|
||||
CDSCompU002DSDown := "U2193"
|
||||
CDSCompU002DSHome := "U2196"
|
||||
CDSCompU002DSPgUp := "U2197"
|
||||
CDSCompU002DSPgDn := "U2198"
|
||||
CDSCompU002DS_End := "U2199"
|
||||
CMSCompU003D := 1
|
||||
CDSCompU003DSLeft := "U21D0"
|
||||
CDSCompU003DS__Up := "U21D1"
|
||||
CDSCompU003DSRght := "U21D2"
|
||||
CDSCompU003DSDown := "U21D3"
|
||||
CDSCompU003DSHome := "U21D6"
|
||||
CDSCompU003DSPgUp := "U21D7"
|
||||
CDSCompU003DSPgDn := "U21D8"
|
||||
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"
|
11
windows/neo-vars/src/Source/performance.ahk
Normal file
11
windows/neo-vars/src/Source/performance.ahk
Normal file
|
@ -0,0 +1,11 @@
|
|||
#MaxThreadsPerHotKey 1
|
||||
Thread,Interrupt,-1,-1
|
||||
|
||||
SetBatchLines -1
|
||||
|
||||
#singleinstance force
|
||||
Process,Priority,,High
|
||||
#MaxHotkeysPerInterval 2000
|
||||
|
||||
#usehook on
|
||||
Sendmode Input
|
822
windows/neo-vars/src/Source/recycle.ahk
Normal file
822
windows/neo-vars/src/Source/recycle.ahk
Normal file
|
@ -0,0 +1,822 @@
|
|||
/******************
|
||||
* Initialisierung *
|
||||
*******************
|
||||
*/
|
||||
|
||||
SetCapsLockState Off
|
||||
SetNumLockState Off
|
||||
SetScrollLockState Off
|
||||
|
||||
name=Neo 2.0 (%A_ScriptName%) (r%Revision%-r%CompRevision%)
|
||||
enable=Aktiviere %name%
|
||||
disable=Deaktiviere %name%
|
||||
#LTrim ; Quelltext kann eingerückt werden,
|
||||
|
||||
/****************
|
||||
* Verzeichnisse *
|
||||
*****************
|
||||
*/
|
||||
; Setzt den Pfad zu einem temporären Verzeichnis
|
||||
EnvGet, WindowsEnvTempFolder, TEMP
|
||||
ResourceFolder = %WindowsEnvTempFolder%\NEO2
|
||||
FileCreateDir, %ResourceFolder%
|
||||
|
||||
; Setzt den Pfad zu den NEO-Anwendungsdateien
|
||||
EnvGet, WindowsEnvAppDataFolder, APPDATA
|
||||
ApplicationFolder = %WindowsEnvAppDataFolder%\NEO2
|
||||
FileCreateDir, %ApplicationFolder%
|
||||
ini = %ApplicationFolder%\NEO2.ini
|
||||
|
||||
/*******************
|
||||
* Globale Schalter *
|
||||
********************
|
||||
*/
|
||||
; Im folgenden gilt (soweit nicht anders angegeben) Ja = 1, Nein = 0:
|
||||
|
||||
; Sollen die Bilder für die Bildschirmtastatur in die compilierte EXE-Datei miteingebunden werden? (Nachteil: grössere Dateigrösse, Vorteil: Referenz für Anfänger stets einfach verfügbar)
|
||||
bildschirmTastaturEinbinden := 1
|
||||
|
||||
; Syntaxhinweis: IniRead, Variable, InputFilename, Section, Key [, DefaultValue]
|
||||
|
||||
; Soll der Treiber im Einhandmodus betrieben werden?
|
||||
IniRead,einHandNeo,%ini%,Global,einHandNeo,0
|
||||
|
||||
; Soll der Lernmodus aktiviert werden?
|
||||
IniRead,lernModus,%ini%,Global,lernModus,0
|
||||
|
||||
; Soll mit einer MsgBox explizit auf das Ein- und Ausschalten des Mod4-Locks hingewiesen werden?
|
||||
IniRead,zeigeLockBox,%ini%,Global,zeigeLockBox,1
|
||||
|
||||
; Soll mit einer MsgBox explizit auf das Ein- und Ausschalten der alternativen Modi (Lernmodus, Einhandmodus, lang-s-Modus, VM-Belegung) hingewiesen werden?
|
||||
IniRead,zeigeModusBox,%ini%,Global,zeigeModusBox,1
|
||||
|
||||
; Soll aktivierter Mod4-Lock über die Rollen-LED des Keybord angezeigt werden (analog zu CapsLock)?
|
||||
IniRead,UseMod4Light,%ini%,Global,UseMod4Light,1
|
||||
|
||||
; Soll Lang-s auf s, s auf ß und ß auf Lang-s gelegt (bzw. vertauscht) werden?
|
||||
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")
|
||||
|
||||
;Soll der Mod2Lock auch auf die Akzente, die Ziffernreihe und das Numpad angewandt werden?
|
||||
; Wird striktesMod2Lock auf 1 gesetzt, wirkt CapsLock wie ShiftLock
|
||||
IniRead,striktesMod2Lock,%ini%,Global,striktesMod2Lock,0
|
||||
|
||||
|
||||
/***********************
|
||||
* Resourcen-Verwaltung *
|
||||
************************
|
||||
*/
|
||||
if(FileExist("ResourceFolder")<>false){
|
||||
; Versuche, alle möglicherweise in die EXE eingebundenen Dateien zu extrahieren
|
||||
FileInstall,neo_enabled.ico,%ResourceFolder%\neo_enabled.ico,1
|
||||
FileInstall,neo_disabled.ico,%ResourceFolder%\neo_disabled.ico,1
|
||||
iconBenutzen=1
|
||||
if (bildschirmTastaturEinbinden=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
|
||||
zeigeBildschirmTastatur=1
|
||||
}
|
||||
}else{
|
||||
MsgBox,"Das Verzeichnis %ResourceFolder% konnte nicht angelegt werden!" ; Diese Zeile dient nur der eventuellen Fehlersuche und sollte eigentlich niemals auftauchen.
|
||||
}
|
||||
|
||||
; Benutze die Dateien auch dann, wenn sie eventuell im aktuellen Verzeichnis vorhanden sind
|
||||
if(FileExist("ebene1.png")&&FileExist("ebene2.png")&&FileExist("ebene3.png")&&FileExist("ebene4.png")&&FileExist("ebene5.png")&&FileExist("ebene6.png"))
|
||||
zeigeBildschirmTastatur=1
|
||||
if(FileExist("neo_enabled.ico")&&FileExist("neo_disabled.ico"))
|
||||
iconBenutzen=1
|
||||
|
||||
/*******************************************
|
||||
* Überprüfung auf deutsches Tastaturlayout *
|
||||
********************************************
|
||||
*/
|
||||
regread,inputlocale,HKEY_CURRENT_USER,Keyboard Layout\Preload,1
|
||||
regread,inputlocalealias,HKEY_CURRENT_USER,Keyboard Layout\Substitutes,%inputlocale%
|
||||
if (inputlocalealias<>inputlocale=%inputlocalealias% and inputlocale<>00000407) {
|
||||
suspend
|
||||
regread,inputlocale,HKEY_LOCAL_MACHINE,SYSTEM\CurrentControlSet\Control\Keyboard Layouts\%inputlocale%,Layout Text
|
||||
msgbox, 48, Warnung!,
|
||||
(
|
||||
Nicht kompatibles Tastaturlayout:
|
||||
`t%inputlocale%
|
||||
`nDas deutsche QWERTZ muss als Standardlayout eingestellt
|
||||
sein, damit %name% wie erwartet funktioniert.
|
||||
`nÄndern Sie die Tastatureinstellung unter
|
||||
`tSystemsteuerung
|
||||
`t-> Regions- und Sprachoptionen
|
||||
`t-> Sprachen
|
||||
`t-> Details... `n
|
||||
)
|
||||
exitapp
|
||||
}
|
||||
|
||||
/*************************
|
||||
* Menü des Systray-Icons *
|
||||
**************************
|
||||
*/
|
||||
if (iconBenutzen)
|
||||
menu,tray,icon,%ResourceFolder%\neo_enabled.ico,,1
|
||||
menu,tray,nostandard
|
||||
menu,tray,add,Öffnen,open
|
||||
menu,helpmenu,add,About,about
|
||||
menu,helpmenu,add,Autohotkey-Hilfe,help
|
||||
menu,helpmenu,add
|
||||
menu,helpmenu,add,http://autohotkey.com/,autohotkey
|
||||
menu,helpmenu,add,http://www.neo-layout.org/,neo
|
||||
menu,tray,add,Hilfe,:helpmenu
|
||||
menu,tray,add
|
||||
menu,tray,add,%disable%,togglesuspend
|
||||
menu,tray,add
|
||||
menu,tray,add,Bearbeiten,edit
|
||||
menu,tray,add,Neu Laden,reload
|
||||
menu,tray,add
|
||||
menu,tray,add,Nicht im Systray anzeigen,hide
|
||||
menu,tray,add,%name% beenden, exitprogram
|
||||
menu,tray,default,%disable%
|
||||
menu,tray,tip,%name%
|
||||
|
||||
/*
|
||||
Sonstige Variablen
|
||||
*/
|
||||
guiErstellt := 0
|
||||
alwaysOnTop := 1
|
||||
wasNonShiftKeyPressed := 0
|
||||
isShiftRPressed := 0
|
||||
isShiftLPressed := 0
|
||||
isShiftPressed := 0
|
||||
isMod2Locked := 0
|
||||
IsMod3RPressed := 0
|
||||
IsMod3LPressed := 0
|
||||
IsMod3Pressed := 0
|
||||
IsMod4RPressed := 0
|
||||
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
|
||||
|
||||
; im folgenden kann man auch noch ein paar Tasten der 4. Ebene deaktivieren
|
||||
; nützlich um sich zu zwingen, richtig zu schreiben
|
||||
lernModus_neo_Backspace := 0
|
||||
lernModus_neo_Entf := 1
|
||||
|
||||
|
||||
|
||||
EbeneAktualisieren() {
|
||||
global
|
||||
Modstate := IsMod4Active() . IsMod3Active()
|
||||
Ebene7 := 0
|
||||
Ebene8 := 0
|
||||
if (Modstate == "00") { ; Ebene 1 oder 2
|
||||
if (IsShiftActive()) ; Ebene 2: Shift oder CapsLock
|
||||
EbeneC := 2
|
||||
else ; Ebene 1: Ohne Mod oder CapsLock mit Shift
|
||||
EbeneC := 1
|
||||
if (IsShiftPressed) ; NC: Ebene 2: Shift (ignoriert CapsLock)
|
||||
EbeneNC := 2
|
||||
else ; NC: Ebene 1: Ohne Mod (ignoriert CapsLock)
|
||||
EbeneNC := 1
|
||||
} else if (Modstate == "01") { ; Ebene 3 oder 5 (ignoriert CapsLock)
|
||||
if (IsShiftPressed) ; Ebene 5: Shift+Mod3
|
||||
EbeneC := 5
|
||||
else ; Ebene 3: Mod3
|
||||
EbeneC := 3
|
||||
EbeneNC := EbeneC ; NC: gleich
|
||||
} else if (Modstate == "10") { ; Ebene 4 (Mit Shift: Auch Ebene 7) (ignoriert CapsLock)
|
||||
EbeneC := 4
|
||||
if (IsShiftPressed) ; Ebene 7: Shift+Mod4
|
||||
Ebene7 := 1
|
||||
EbeneNC := EbeneC ; NC: gleich
|
||||
} else if (ModState == "11") { ; Ebene 6 (Mit Shift Xoder CapsLock: Auch Ebene 8)
|
||||
EbeneC := 6
|
||||
if (IsShiftPressed) ; Ebene 8: Shift (ignoriert CapsLock)
|
||||
Ebene8 := 1
|
||||
EbeneNC := EbeneC ; NC: gleich
|
||||
}
|
||||
}
|
||||
|
||||
IsShiftActive() {
|
||||
global
|
||||
if (isMod2Locked)
|
||||
if (isShiftPressed)
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
else
|
||||
if (isShiftPressed)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
}
|
||||
|
||||
IsMod3Active() {
|
||||
global
|
||||
return isMod3Pressed
|
||||
}
|
||||
|
||||
IsMod4Active() {
|
||||
global
|
||||
if (isMod4Locked)
|
||||
if (isMod4Pressed)
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
else
|
||||
if (isMod4Pressed)
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
}
|
||||
|
||||
/*
|
||||
------------------------------------------------------
|
||||
Methode KeyboardLED zur Steuerung der Keyboard-LEDs
|
||||
(NumLock/CapsLock/ScrollLock-Lichter)
|
||||
|
||||
Benutzungshinweise: Man benutze
|
||||
KeyboardLED(LEDvalue,"Cmd"), wobei
|
||||
Cmd = on/off/switch,
|
||||
LEDvalue: ScrollLock=1, NumLock=2, CapsLock=4,
|
||||
bzw. eine beliebige Summe dieser Werte:
|
||||
AlleAus=0, CapsLock+NumLock=6, etc.
|
||||
|
||||
Der folgende Code wurde übernommen von:
|
||||
http://www.autohotkey.com/forum/viewtopic.php?t=10532
|
||||
|
||||
Um eventuelle Wechselwirkungen mit dem bestehenden
|
||||
Code (insb. der Unicode-Konvertierung) auszuschließen,
|
||||
sind auch alle (Hilfsmethoden) mit dem Postfix LED
|
||||
versehen worden.
|
||||
------------------------------------------------------
|
||||
*/
|
||||
|
||||
KeyboardLED(LEDvalue, Cmd){ ; LEDvalue: ScrollLock=1, NumLock=2, CapsLock=4 ; Cmd = on/off/switch
|
||||
Static h_device
|
||||
If ! h_device ; initialise
|
||||
{
|
||||
device=\Device\KeyBoardClass0
|
||||
SetUnicodeStrLED(fn,device)
|
||||
h_device:=NtCreateFileLED(fn,0+0x00000100+0x00000080+0x00100000,1,1,0x00000040+0x00000020,0)
|
||||
}
|
||||
VarSetCapacity(output_actual,4,0)
|
||||
input_size=4
|
||||
VarSetCapacity(input,input_size,0)
|
||||
If Cmd=switch ;switches every LED according to LEDvalue
|
||||
KeyLED:=LEDvalue
|
||||
If Cmd=on ;forces all choosen LED's to ON (LEDvalue= 0 ->LED's according to keystate)
|
||||
KeyLED:=LEDvalue | (GetKeyState("ScrollLock", "T") + 2*GetKeyState("NumLock", "T") + 4*GetKeyState("CapsLock", "T"))
|
||||
If Cmd=off ;forces all choosen LED's to OFF (LEDvalue= 0 ->LED's according to keystate)
|
||||
{
|
||||
LEDvalue:=LEDvalue ^ 7
|
||||
KeyLED:=LEDvalue & (GetKeyState("ScrollLock","T") + 2*GetKeyState("NumLock","T") + 4*GetKeyState("CapsLock","T"))
|
||||
}
|
||||
; EncodeIntegerLED(KeyLED,1,&input,2) ;input bit pattern (KeyLED): bit 0 = scrolllock ;bit 1 = numlock ;bit 2 = capslock
|
||||
input:=Chr(1) Chr(1) Chr(KeyLED)
|
||||
input:=Chr(1)
|
||||
input=
|
||||
success:=DllCall("DeviceIoControl"
|
||||
, "uint", h_device
|
||||
, "uint", CTL_CODE_LED( 0x0000000b ; FILE_DEVICE_KEYBOARD
|
||||
, 2
|
||||
, 0 ; METHOD_BUFFERED
|
||||
, 0 ) ; FILE_ANY_ACCESS
|
||||
, "uint", &input
|
||||
, "uint", input_size
|
||||
, "uint", 0
|
||||
, "uint", 0
|
||||
, "uint", &output_actual
|
||||
, "uint", 0 )
|
||||
}
|
||||
|
||||
CTL_CODE_LED(p_device_type,p_function,p_method,p_access ){
|
||||
Return, ( p_device_type << 16 ) | ( p_access << 14 ) | ( p_function << 2 ) | p_method
|
||||
}
|
||||
|
||||
NtCreateFileLED(ByRef wfilename,desiredaccess,sharemode,createdist,flags,fattribs){
|
||||
VarSetCapacity(fh,4,0)
|
||||
VarSetCapacity(objattrib,24,0)
|
||||
VarSetCapacity(io,8,0)
|
||||
VarSetCapacity(pus,8)
|
||||
uslen:=DllCall("lstrlenW","str",wfilename)*2
|
||||
InsertIntegerLED(uslen,pus,0,2)
|
||||
InsertIntegerLED(uslen,pus,2,2)
|
||||
InsertIntegerLED(&wfilename,pus,4)
|
||||
InsertIntegerLED(24,objattrib,0)
|
||||
InsertIntegerLED(&pus,objattrib,8)
|
||||
status:=DllCall("ntdll\ZwCreateFile","str",fh,"UInt",desiredaccess,"str",objattrib,"str",io,"UInt",0,"UInt",fattribs
|
||||
,"UInt",sharemode,"UInt",createdist,"UInt",flags,"UInt",0,"UInt",0, "UInt")
|
||||
return ExtractIntegerLED(fh)
|
||||
}
|
||||
|
||||
SetUnicodeStrLED(ByRef out, str_){
|
||||
VarSetCapacity(st1, 8, 0)
|
||||
InsertIntegerLED(0x530025, st1)
|
||||
VarSetCapacity(out, (StrLen(str_)+1)*2, 0)
|
||||
DllCall("wsprintfW", "str", out, "str", st1, "str", str_, "Cdecl UInt")
|
||||
}
|
||||
|
||||
ExtractIntegerLED(ByRef pSource, pOffset = 0, pIsSigned = false, pSize = 4){
|
||||
; pSource is a string (buffer) whose memory area contains a raw/binary integer at pOffset.
|
||||
; The caller should pass true for pSigned to interpret the result as signed vs. unsigned.
|
||||
; pSize is the size of PSource's integer in bytes (e.g. 4 bytes for a DWORD or Int).
|
||||
; pSource must be ByRef to avoid corruption during the formal-to-actual copying process
|
||||
; (since pSource might contain valid data beyond its first binary zero).
|
||||
Loop %pSize% ; Build the integer by adding up its bytes.
|
||||
result += *(&pSource + pOffset + A_Index-1) << 8*(A_Index-1)
|
||||
if (!pIsSigned OR pSize > 4 OR result < 0x80000000)
|
||||
return result ; Signed vs. unsigned doesn't matter in these cases.
|
||||
; Otherwise, convert the value (now known to be 32-bit) to its signed counterpart:
|
||||
return -(0xFFFFFFFF - result + 1)
|
||||
}
|
||||
|
||||
InsertIntegerLED(pInteger, ByRef pDest, pOffset = 0, pSize = 4){
|
||||
; The caller must ensure that pDest has sufficient capacity. To preserve any existing contents in pDest,
|
||||
; only pSize number of bytes starting at pOffset are altered in it.
|
||||
Loop %pSize% ; Copy each byte in the integer into the structure as raw binary data.
|
||||
DllCall("RtlFillMemory", "UInt", &pDest + pOffset + A_Index-1, "UInt", 1, "UChar", pInteger >> 8*(A_Index-1) & 0xFF)
|
||||
}
|
||||
|
||||
/*
|
||||
------------------------------------------------------
|
||||
Methoden zum Senden von Unicode-Zeichen
|
||||
------------------------------------------------------
|
||||
|
||||
Über den GTK-Workaround:
|
||||
Dieser basiert auf http://www.autohotkey.com/forum/topic32947.html
|
||||
Der Aufruf von »SubStr(charCode,3)« geht davon aus, dass alle charCodes in Hex mit führendem „0x“ angegeben sind. Die abenteuerliche „^+u“-Konstruktion benötigt im Übrigen den Hex-Wert in Kleinschrift, was derzeit nicht bei den Zeichendefinitionen umgesetzt ist, daher zentral und weniger fehlerträchtig an dieser Stelle. Außerdem ein abschließend gesendetes Space, sonst bleibt der „eingetippte“ Unicode-Wert noch kurz sichtbar stehen, bevor er sich GTK-sei-dank in das gewünschte Zeichen verwandelt.
|
||||
Optimierungen von http://fmate14.web.elte.hu/autohotkey/SendU/SendU.ahk
|
||||
*/
|
||||
|
||||
SendUnicodeChar(charCode){
|
||||
IfWinActive,ahk_class gdkWindowToplevel
|
||||
{
|
||||
StringLower,charCode,charCode
|
||||
send % "^+u" . SubStr(charCode,3) . " "
|
||||
} else {
|
||||
static ki := "#"
|
||||
if (ki =="#") {
|
||||
VarSetCapacity(ki,28*2,0)
|
||||
DllCall("RtlFillMemory","uint",&ki+ 0,"uint",1,"uint",1)
|
||||
DllCall("RtlFillMemory","uint",&ki+28+0,"uint",1,"uint",1)
|
||||
}
|
||||
DllCall("ntdll.dll\RtlFillMemoryUlong","uint",&ki+ 6,"uint",4,"uint",0x40000|charCode) ;KEYEVENTF_UNICODE
|
||||
DllCall("ntdll.dll\RtlFillMemoryUlong","uint",&ki+28+6,"uint",4,"uint",0x60000|charCode) ;KEYEVENTF_KEYUP|KEYEVENTF_UNICODE
|
||||
DllCall("SendInput","UInt",2,"UInt",&ki,"Int",28)
|
||||
}
|
||||
}
|
||||
|
||||
SendUnicodeCharDown(charCode){
|
||||
IfWinActive,ahk_class gdkWindowToplevel
|
||||
{
|
||||
StringLower,charCode,charCode
|
||||
send % "^+u" . SubStr(charCode,3) . " "
|
||||
} else {
|
||||
static ki := "#"
|
||||
if (ki =="#") {
|
||||
VarSetCapacity(ki,28,0)
|
||||
DllCall("RtlFillMemory","uint",&ki,"uint",1,"uint",1)
|
||||
}
|
||||
DllCall("ntdll.dll\RtlFillMemoryUlong","uint",&ki+6,"uint",4,"uint",0x40000|charCode) ;KEYEVENTF_UNICODE
|
||||
DllCall("SendInput","UInt",1,"UInt",&ki,"Int",28)
|
||||
}
|
||||
}
|
||||
|
||||
SendUnicodeCharUp(charCode){
|
||||
IfWinActive,ahk_class gdkWindowToplevel
|
||||
{
|
||||
; nothing
|
||||
} else {
|
||||
static ki := "#"
|
||||
if (ki =="#") {
|
||||
VarSetCapacity(ki,28,0)
|
||||
DllCall("RtlFillMemory","uint",&ki,"uint",1,"uint",1)
|
||||
}
|
||||
DllCall("ntdll.dll\RtlFillMemoryUlong","uint",&ki+6,"uint",4,"uint",0x60000|charCode) ;KEYEVENTF_KEYUP|KEYEVENTF_UNICODE
|
||||
DllCall("SendInput","UInt",1,"UInt",&ki,"Int",28)
|
||||
}
|
||||
}
|
||||
|
||||
/**********************
|
||||
* Tastenkombinationen *
|
||||
***********************
|
||||
*/
|
||||
|
||||
; dieser Hook fixt einen AHK-Bug, dass dieses bei Reload und gedruecktem Mod4
|
||||
; den ersten hook ausfuehrt, als waere dieser tatsaechlich aufgerufen worden.
|
||||
; Wenn man hier einen unverfaenglichen Hook eintraegt, gibt es keine Broesel.
|
||||
~F24::return
|
||||
|
||||
+pause::
|
||||
Suspend, Permit
|
||||
goto togglesuspend
|
||||
|
||||
/*****************
|
||||
* Menüfunktionen *
|
||||
******************
|
||||
*/
|
||||
togglesuspend:
|
||||
if A_IsSuspended {
|
||||
menu, tray, rename, %enable%, %disable%
|
||||
menu, tray, tip, %name%
|
||||
if (iconBenutzen)
|
||||
menu, tray, icon, %ResourceFolder%\neo_enabled.ico,,1
|
||||
suspend , off ; Schaltet Suspend aus -> NEO
|
||||
} else {
|
||||
menu, tray, rename, %disable%, %enable%
|
||||
menu, tray, tip, %name% : Deaktiviert
|
||||
if (iconBenutzen)
|
||||
menu, tray, icon, %ResourceFolder%\neo_disabled.ico,,1
|
||||
suspend , on ; Schaltet Suspend ein -> QWERTZ
|
||||
}
|
||||
return
|
||||
|
||||
help:
|
||||
Run, %A_WinDir%\hh mk:@MSITStore:autohotkey.chm
|
||||
return
|
||||
|
||||
about:
|
||||
msgbox, 64, %name% – Ergonomische Tastaturbelegung,
|
||||
(
|
||||
%name%
|
||||
`nDas Neo-Layout ersetzt das übliche deutsche
|
||||
Tastaturlayout mit der Alternative Neo,
|
||||
beschrieben auf http://neo-layout.org/.
|
||||
`nDazu sind keine Administratorrechte nötig.
|
||||
`nWenn Autohotkey aktiviert ist, werden alle Tastendrucke
|
||||
abgefangen und statt dessen eine Übersetzung weitergeschickt.
|
||||
`nDies geschieht transparent für den Anwender,
|
||||
es muss nichts installiert werden.
|
||||
`nDie Zeichenübersetzung kann leicht über das Icon im
|
||||
Systemtray deaktiviert werden. `n
|
||||
)
|
||||
return
|
||||
|
||||
neo:
|
||||
run http://neo-layout.org/
|
||||
return
|
||||
|
||||
autohotkey:
|
||||
run http://autohotkey.com/
|
||||
return
|
||||
|
||||
open:
|
||||
ListLines ; shows the Autohotkey window
|
||||
return
|
||||
|
||||
edit:
|
||||
edit
|
||||
return
|
||||
|
||||
reload:
|
||||
Reload
|
||||
return
|
||||
|
||||
hide:
|
||||
menu, tray, noicon
|
||||
return
|
||||
|
||||
exitprogram:
|
||||
exitapp
|
||||
return
|
||||
|
||||
; LShift+RShift == CapsLock (simuliert)
|
||||
; Es werden nur die beiden Tastenkombinationen abgefragt,
|
||||
; daher kommen LShift und RShift ungehindert bis in die
|
||||
; Applikation. Dies ist aber merkwürdig, da beide Shift-
|
||||
; Tasten nun /modifier keys/ werden und, wie in der AHK-
|
||||
; Hilfe beschrieben, eigentlich nicht mehr bis zur App
|
||||
; durchkommen sollten.
|
||||
; KeyboardLED(4,"switch") hatte ich zuerst genommen, aber
|
||||
; das schaltet, oh Wunder, die LED nicht wieder aus.
|
||||
|
||||
~*VKA1SC136::
|
||||
if (isShiftLPressed and !isShiftRPressed and !wasNonShiftKeyPressed)
|
||||
ToggleMod2Lock()
|
||||
isShiftRPressed := 1
|
||||
isShiftPressed := 1
|
||||
wasNonShiftKeyPressed := 0
|
||||
EbeneAktualisieren()
|
||||
return
|
||||
|
||||
~*VKA1SC136 up::
|
||||
isShiftRPressed := 0
|
||||
isShiftPressed := isShiftLPressed
|
||||
EbeneAktualisieren()
|
||||
return
|
||||
|
||||
~*VKA0SC02A::
|
||||
if (isShiftRPressed and !isShiftLPressed and !wasNonShiftKeyPressed)
|
||||
ToggleMod2Lock()
|
||||
isShiftLPressed := 1
|
||||
isShiftPressed := 1
|
||||
wasNonShiftKeyPressed := 0
|
||||
EbeneAktualisieren()
|
||||
return
|
||||
|
||||
~*VKA0SC02A up::
|
||||
isShiftLPressed := 0
|
||||
isShiftPressed := isShiftRPressed
|
||||
EbeneAktualisieren()
|
||||
return
|
||||
|
||||
ToggleMod2Lock() {
|
||||
global
|
||||
if (isMod2Locked)
|
||||
{
|
||||
isMod2Locked := 0
|
||||
KeyboardLED(4,"off")
|
||||
}
|
||||
else
|
||||
{
|
||||
isMod2Locked := 1
|
||||
KeyBoardLED(4,"on")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
*VKBFSC02B::
|
||||
if (isMod3LPressed and !isMod3RPressed and !wasNonShiftKeyPressed)
|
||||
CharStarDown("MOD3", "MOD3", "SComp")
|
||||
isMod3RPressed := 1
|
||||
isMod3Pressed := 1
|
||||
wasNonShiftKeyPressed := 0
|
||||
EbeneAktualisieren()
|
||||
return
|
||||
|
||||
*VKBFSC02B up::
|
||||
if (isMod3LPressed)
|
||||
CharStarUp("MOD3")
|
||||
isMod3RPressed := 0
|
||||
isMod3Pressed := isMod3LPressed
|
||||
EbeneAktualisieren()
|
||||
return
|
||||
|
||||
*VK14SC03A::
|
||||
if (isMod3RPressed and !isMod3LPressed and !wasNonShiftKeyPressed)
|
||||
CharStarDown("MOD3", "MOD3", "SComp")
|
||||
isMod3LPressed := 1
|
||||
isMod3Pressed := 1
|
||||
wasNonShiftKeyPressed := 0
|
||||
EbeneAktualisieren()
|
||||
return
|
||||
|
||||
*VK14SC03A up::
|
||||
if (isMod3RPressed)
|
||||
CharStarUp("MOD3")
|
||||
isMod3LPressed := 0
|
||||
isMod3Pressed := isMod3RPressed
|
||||
EbeneAktualisieren()
|
||||
return
|
||||
|
||||
;Mod4+Mod4 == Mod4-Lock
|
||||
; Im Gegensatz zu LShift+RShift werden die beiden Tasten
|
||||
; _nicht_ zur Applikation weitergeleitet, und nur bei
|
||||
; gleichzeitigem Drücken wird der Mod4-Lock aktiviert und
|
||||
; angezeigt.
|
||||
|
||||
*VKA5SC138::
|
||||
wasMod4RPressed := isMod4RPressed
|
||||
isMod4RPressed := 1
|
||||
isMod4Pressed := 1
|
||||
waswasNonShiftKeyPressed := wasNonShiftKeyPressed
|
||||
wasNonShiftKeyPressed := 0
|
||||
EbeneAktualisieren()
|
||||
if (isMod4LPressed and !wasMod4RPressed and !waswasNonShiftKeyPressed)
|
||||
ToggleMod4Lock()
|
||||
return
|
||||
|
||||
*VKA5SC138 up::
|
||||
isMod4RPressed := 0
|
||||
isMod4Pressed := isMod4LPressed
|
||||
EbeneAktualisieren()
|
||||
return
|
||||
|
||||
*VKE2SC056::
|
||||
wasMod4LPressed := isMod4LPressed
|
||||
isMod4LPressed := 1
|
||||
isMod4Pressed := 1
|
||||
waswasNonShiftKeyPressed := wasNonShiftKeyPressed
|
||||
wasNonShiftKeyPressed := 0
|
||||
EbeneAktualisieren()
|
||||
if (isMod4RPressed and !wasMod4LPressed and !waswasNonShiftKeyPressed)
|
||||
ToggleMod4Lock()
|
||||
return
|
||||
|
||||
*VKE2SC056 up::
|
||||
isMod4LPressed := 0
|
||||
isMod4Pressed := isMod4RPressed
|
||||
EbeneAktualisieren()
|
||||
return
|
||||
|
||||
ToggleMod4Lock() {
|
||||
global
|
||||
if (IsMod4Locked) {
|
||||
IsMod4Locked := 0
|
||||
if (UseMod4Light)
|
||||
KeyboardLED(1,"off")
|
||||
if (zeigeLockBox)
|
||||
TrayTip,Mod4-Feststellung,Die Feststellung wurde aufgehoben.,3,1
|
||||
} else {
|
||||
IsMod4Locked := 1
|
||||
if (UseMod4Light)
|
||||
KeyboardLED(1,"on")
|
||||
if (zeigeLockBox)
|
||||
TrayTip,Mod4-Feststellung,Um Mod4 wieder zu lösen`, drücke beide Mod4-Tasten gleichzeitig!,3,1
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
------------------------------------------------------
|
||||
BildschirmTastatur
|
||||
------------------------------------------------------
|
||||
*/
|
||||
|
||||
F1::
|
||||
if(isMod4Active() && zeigeBildschirmTastatur)
|
||||
goto Switch1
|
||||
else send {blind}{F1}
|
||||
return
|
||||
|
||||
F2::
|
||||
if(isMod4Active() && zeigeBildschirmTastatur)
|
||||
goto Switch2
|
||||
else send {blind}{F2}
|
||||
return
|
||||
|
||||
F3::
|
||||
if(isMod4Active() && zeigeBildschirmTastatur)
|
||||
goto Switch3
|
||||
else send {blind}{F3}
|
||||
return
|
||||
|
||||
F4::
|
||||
if(isMod4Active() && zeigeBildschirmTastatur)
|
||||
goto Switch4
|
||||
else send {blind}{F4}
|
||||
return
|
||||
|
||||
F5::
|
||||
if(isMod4Active() && zeigeBildschirmTastatur)
|
||||
goto Switch5
|
||||
else send {blind}{F5}
|
||||
return
|
||||
|
||||
F6::
|
||||
if(isMod4Active() && zeigeBildschirmTastatur)
|
||||
goto Switch6
|
||||
else send {blind}{F6}
|
||||
return
|
||||
|
||||
F7::
|
||||
if(isMod4Active() && zeigeBildschirmTastatur)
|
||||
goto Show
|
||||
else send {blind}{F7}
|
||||
return
|
||||
|
||||
F8::
|
||||
if(isMod4Active() && zeigeBildschirmTastatur)
|
||||
goto ToggleAlwaysOnTop
|
||||
else send {blind}{F8}
|
||||
return
|
||||
|
||||
Switch1:
|
||||
tImage := ResourceFolder . "\ebene1.png"
|
||||
goto Switch
|
||||
Return
|
||||
|
||||
Switch2:
|
||||
tImage := ResourceFolder . "\ebene2.png"
|
||||
goto Switch
|
||||
Return
|
||||
|
||||
Switch3:
|
||||
tImage := ResourceFolder . "\ebene3.png"
|
||||
goto Switch
|
||||
Return
|
||||
|
||||
Switch4:
|
||||
tImage := ResourceFolder . "\ebene4.png"
|
||||
goto Switch
|
||||
Return
|
||||
|
||||
Switch5:
|
||||
tImage := ResourceFolder . "\ebene5.png"
|
||||
goto Switch
|
||||
Return
|
||||
|
||||
Switch6:
|
||||
tImage := ResourceFolder . "\ebene6.png"
|
||||
goto Switch
|
||||
Return
|
||||
|
||||
SwitchDK:
|
||||
tImage := ResourceFolder . "\deadkeys.png"
|
||||
goto Switch
|
||||
Return
|
||||
|
||||
Switch:
|
||||
if (guiErstellt)
|
||||
{
|
||||
if (Image = tImage)
|
||||
goto Close
|
||||
else
|
||||
{
|
||||
Image := tImage
|
||||
SetTimer, Refresh
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Image := tImage
|
||||
goto Show
|
||||
}
|
||||
Return
|
||||
|
||||
Show:
|
||||
if (guiErstellt)
|
||||
{
|
||||
goto Close
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Image = "")
|
||||
{
|
||||
Image := ResourceFolder . "\ebene1.png"
|
||||
}
|
||||
yPosition := A_ScreenHeight -270
|
||||
Gui, Color, FFFFFF
|
||||
Gui, Add, Button, xm+5 gSwitch1, F1
|
||||
Gui, Add, Text, x+5, kleine Buchstaben
|
||||
Gui, Add, Button, xm+5 gSwitch2, F2
|
||||
Gui, Add, Text, x+5, große Buchstaben
|
||||
Gui, Add, Button, xm+5 gSwitch3, F3
|
||||
Gui, Add, Text, x+5, Satz-/Sonderzeichen
|
||||
Gui, Add, Button, xm+5 gSwitch4, F4
|
||||
Gui, Add, Text, x+5, Zahlen / Steuerung
|
||||
Gui, Add, Button, xm+5 gSwitch5, F5
|
||||
Gui, Add, Text, x+5, Sprachen
|
||||
Gui, Add, Button, xm+5 gSwitch6, F6
|
||||
Gui, Add, Text, x+5, Mathesymbole
|
||||
Gui, Add, Button, xm+5 gShow, F7
|
||||
Gui, Add, Text, x+5, An /
|
||||
Gui, Add, Text, y+3, Aus
|
||||
Gui, Add, Button, x+10 y+-30 gShow, F8
|
||||
Gui, Add, Text, x+5, OnTop
|
||||
Gui, Add, Button, xm+5 gSwitchDK, Deadkeys
|
||||
Gui, Add, Picture,AltSubmit ys w729 h199 vPicture, %Image%
|
||||
Gui, +AlwaysOnTop
|
||||
Gui, Show, y%yposition% Autosize
|
||||
; SetTimer, Refresh
|
||||
guiErstellt = 1
|
||||
}
|
||||
Return
|
||||
|
||||
Close:
|
||||
guiErstellt = 0
|
||||
Gui, Destroy
|
||||
Return
|
||||
|
||||
Refresh:
|
||||
If (Image != OldImage)
|
||||
{
|
||||
GuiControl, , Picture, %Image%
|
||||
OldImage := Image
|
||||
}
|
||||
Return
|
||||
|
||||
ToggleAlwaysOnTop:
|
||||
if (alwaysOnTop)
|
||||
{
|
||||
Gui, -AlwaysOnTop
|
||||
alwaysOnTop = 0
|
||||
}
|
||||
else
|
||||
{
|
||||
Gui, +AlwaysOnTop
|
||||
alwaysOnTop = 1
|
||||
}
|
||||
Return
|
24
windows/neo-vars/src/Source/resources.ahk
Normal file
24
windows/neo-vars/src/Source/resources.ahk
Normal file
|
@ -0,0 +1,24 @@
|
|||
EnvGet, WindowsEnvTempFolder, TEMP
|
||||
ResourceFolder = %WindowsEnvTempFolder%\NEO2
|
||||
FileCreateDir, %ResourceFolder%
|
||||
|
||||
if (FileExist("ResourceFolder")) {
|
||||
FileInstall,neo_enabled.ico,%ResourceFolder%\neo_enabled.ico,1
|
||||
FileInstall,neo_disabled.ico,%ResourceFolder%\neo_disabled.ico,1
|
||||
iconBenutzen=1
|
||||
if (bildschirmTastaturEinbinden=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
|
||||
zeigeBildschirmTastatur := 1
|
||||
}
|
||||
}
|
||||
if(FileExist("ebene1.png")&&FileExist("ebene2.png")&&FileExist("ebene3.png")&&FileExist("ebene4.png")&&FileExist("ebene5.png")&&FileExist("ebene6.png"))
|
||||
zeigeBildschirmTastatur=1
|
||||
if(FileExist("neo_enabled.ico")&&FileExist("neo_disabled.ico"))
|
||||
iconBenutzen=1
|
||||
|
166
windows/neo-vars/src/Source/screenkeyboard.ahk
Normal file
166
windows/neo-vars/src/Source/screenkeyboard.ahk
Normal file
|
@ -0,0 +1,166 @@
|
|||
Switch:
|
||||
if (guiErstellt)
|
||||
{
|
||||
if (Image = tImage)
|
||||
goto Close
|
||||
else
|
||||
{
|
||||
Image := tImage
|
||||
SetTimer, Refresh
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Image := tImage
|
||||
goto Show
|
||||
}
|
||||
Return
|
||||
|
||||
Show:
|
||||
if (guiErstellt)
|
||||
{
|
||||
goto Close
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Image = "")
|
||||
{
|
||||
Image := ResourceFolder . "\ebene1.png"
|
||||
}
|
||||
yPosition := A_ScreenHeight -270
|
||||
Gui, Color, FFFFFF
|
||||
Gui, Add, Button, xm+5 gSwitch1, F1
|
||||
Gui, Add, Text, x+5, kleine Buchstaben
|
||||
Gui, Add, Button, xm+5 gSwitch2, F2
|
||||
Gui, Add, Text, x+5, große Buchstaben
|
||||
Gui, Add, Button, xm+5 gSwitch3, F3
|
||||
Gui, Add, Text, x+5, Satz-/Sonderzeichen
|
||||
Gui, Add, Button, xm+5 gSwitch4, F4
|
||||
Gui, Add, Text, x+5, Zahlen / Steuerung
|
||||
Gui, Add, Button, xm+5 gSwitch5, F5
|
||||
Gui, Add, Text, x+5, Sprachen
|
||||
Gui, Add, Button, xm+5 gSwitch6, F6
|
||||
Gui, Add, Text, x+5, Mathesymbole
|
||||
Gui, Add, Button, xm+5 gShow, F7
|
||||
Gui, Add, Text, x+5, An /
|
||||
Gui, Add, Text, y+3, Aus
|
||||
Gui, Add, Button, x+10 y+-30 gShow, F8
|
||||
Gui, Add, Text, x+5, OnTop
|
||||
Gui, Add, Button, xm+5 gSwitchDK, Deadkeys
|
||||
Gui, Add, Picture,AltSubmit ys w729 h199 vPicture, %Image%
|
||||
Gui, +AlwaysOnTop
|
||||
Gui, Show, y%yposition% Autosize
|
||||
; SetTimer, Refresh
|
||||
guiErstellt = 1
|
||||
}
|
||||
Return
|
||||
|
||||
Close:
|
||||
guiErstellt = 0
|
||||
Gui, Destroy
|
||||
Return
|
||||
|
||||
Refresh:
|
||||
If (Image != OldImage)
|
||||
{
|
||||
GuiControl, , Picture, %Image%
|
||||
OldImage := Image
|
||||
}
|
||||
Return
|
||||
|
||||
ToggleAlwaysOnTop:
|
||||
if (alwaysOnTop)
|
||||
{
|
||||
Gui, -AlwaysOnTop
|
||||
alwaysOnTop = 0
|
||||
}
|
||||
else
|
||||
{
|
||||
Gui, +AlwaysOnTop
|
||||
alwaysOnTop = 1
|
||||
}
|
||||
Return
|
||||
|
||||
F1::
|
||||
if(isMod4Active() && zeigeBildschirmTastatur)
|
||||
goto Switch1
|
||||
else send {blind}{F1}
|
||||
return
|
||||
|
||||
F2::
|
||||
if(isMod4Active() && zeigeBildschirmTastatur)
|
||||
goto Switch2
|
||||
else send {blind}{F2}
|
||||
return
|
||||
|
||||
F3::
|
||||
if(isMod4Active() && zeigeBildschirmTastatur)
|
||||
goto Switch3
|
||||
else send {blind}{F3}
|
||||
return
|
||||
|
||||
F4::
|
||||
if(isMod4Active() && zeigeBildschirmTastatur)
|
||||
goto Switch4
|
||||
else send {blind}{F4}
|
||||
return
|
||||
|
||||
F5::
|
||||
if(isMod4Active() && zeigeBildschirmTastatur)
|
||||
goto Switch5
|
||||
else send {blind}{F5}
|
||||
return
|
||||
|
||||
F6::
|
||||
if(isMod4Active() && zeigeBildschirmTastatur)
|
||||
goto Switch6
|
||||
else send {blind}{F6}
|
||||
return
|
||||
|
||||
F7::
|
||||
if(isMod4Active() && zeigeBildschirmTastatur)
|
||||
goto SwitchDK
|
||||
else send {blind}{F7}
|
||||
return
|
||||
|
||||
F8::
|
||||
if(isMod4Active() && zeigeBildschirmTastatur)
|
||||
goto ToggleAlwaysOnTop
|
||||
else send {blind}{F8}
|
||||
return
|
||||
|
||||
Switch1:
|
||||
tImage := ResourceFolder . "\ebene1.png"
|
||||
goto Switch
|
||||
Return
|
||||
|
||||
Switch2:
|
||||
tImage := ResourceFolder . "\ebene2.png"
|
||||
goto Switch
|
||||
Return
|
||||
|
||||
Switch3:
|
||||
tImage := ResourceFolder . "\ebene3.png"
|
||||
goto Switch
|
||||
Return
|
||||
|
||||
Switch4:
|
||||
tImage := ResourceFolder . "\ebene4.png"
|
||||
goto Switch
|
||||
Return
|
||||
|
||||
Switch5:
|
||||
tImage := ResourceFolder . "\ebene5.png"
|
||||
goto Switch
|
||||
Return
|
||||
|
||||
Switch6:
|
||||
tImage := ResourceFolder . "\ebene6.png"
|
||||
goto Switch
|
||||
Return
|
||||
|
||||
SwitchDK:
|
||||
tImage := ResourceFolder . "\deadkeys.png"
|
||||
goto Switch
|
||||
Return
|
||||
|
138
windows/neo-vars/src/Source/shortcuts.ahk
Normal file
138
windows/neo-vars/src/Source/shortcuts.ahk
Normal file
|
@ -0,0 +1,138 @@
|
|||
/* SHORTCUTS
|
||||
Da in diesem AHK-Skript sämtliche Tastendrücke zur weiteren Verarbeitung
|
||||
in Unicode- und Spezialzeichen umgewandelt werden, müssen sie für eine
|
||||
effiziente Tasten-Ausgabe, wo möglich, zurück gewandelt werden. Dazu
|
||||
dienen Shortcuts: Soll beispielsweise das Unicode-Zeichen U0061 (kleines
|
||||
a) ausgegeben werden, muss dieses durch "send {a}" ersetzt werden. Die
|
||||
dafür notwendigen Rückwandlungskonstanten werden hier, teilweise
|
||||
automatisiert, definiert und im entsprechenden Unterprogramm zur Anwendung
|
||||
gebracht.
|
||||
*/
|
||||
|
||||
; ###### Shortcuts für alle ASCII-Zeichen (0x21 bis 0x7E)
|
||||
SetFormat, integer, hex
|
||||
char := 0x21
|
||||
loop {
|
||||
s1 := SubStr(char,3)
|
||||
CSU00%s1% := chr(char)
|
||||
char += 1
|
||||
if (char = 0x7E)
|
||||
break
|
||||
}
|
||||
SetFormat, integer, d
|
||||
|
||||
; #### weitere Shortcuts
|
||||
CSU0008 := "Backspace"
|
||||
CSU0009 := "tab"
|
||||
CSU000D := "Enter"
|
||||
CSU001B := "esc"
|
||||
CSU0020 := "space"
|
||||
|
||||
/**** die folgenden Shortcuts ersetzen die automatische Wahl entsprechender
|
||||
**** down- und up-Sendezeichen, da die Zeichenerzeugung entweder aufwändiger
|
||||
**** ist (wie bei den diversen toten Zeichen) oder schlicht mit AHK nicht
|
||||
**** geht (wie das Key-Repeat der schließenden Klammer).
|
||||
*/
|
||||
DNCSU005E := "{^}{space}"
|
||||
DNCSU0060 := "{``}{space}"
|
||||
DNCSU007D := "{}}" ; "{} down}" geht nicht, warum auch immer
|
||||
DNCSU00B4 := "{´}{space}"
|
||||
UNSHU00B4 := 1
|
||||
|
||||
/**** die meisten der folgenden Shortcuts werden von AHK zwar verarbeitet,
|
||||
**** von dort aber nur als ALT+Numpad verschickt und daher nicht für alle
|
||||
**** Programme nutzbar, also auskommentiert und als Unicode-Zeichen
|
||||
**** geschickt.
|
||||
*/
|
||||
CSU20AC := chr(128) ; €
|
||||
UNSHU20AC := 1
|
||||
; CSU201A := chr(130) ; ‚
|
||||
; CSU0192 := chr(131) ; ƒ
|
||||
; CSU201E := chr(132) ; „
|
||||
; CSU2026 := chr(133) ; …
|
||||
; CSU2020 := chr(134) ; †
|
||||
; CSU2021 := chr(135) ; ‡
|
||||
; CSU02C6 := chr(136) ; ˆ
|
||||
; CSU2030 := chr(137) ; ‰
|
||||
; CSU0160 := chr(138) ; Š
|
||||
; CSU2039 := chr(139) ; ‹
|
||||
; CSU0152 := chr(140) ; Œ
|
||||
; CSU017D := chr(142) ; Ž
|
||||
; CSU2018 := chr(145) ; ‘
|
||||
; CSU2019 := chr(146) ; ’
|
||||
; CSU201C := chr(147) ; “
|
||||
; CSU201D := chr(148) ; ”
|
||||
; CSU2022 := chr(149) ; •
|
||||
; CSU2013 := chr(150) ; –
|
||||
; CSU2014 := chr(151) ; —
|
||||
; CSU02DC := chr(152) ; ˜
|
||||
; CSU2122 := chr(153) ; ™
|
||||
; CSU0161 := chr(154) ; š
|
||||
; CSU203A := chr(155) ; ›
|
||||
; CSU0153 := chr(156) ; œ
|
||||
; CSU017E := chr(158) ; ž
|
||||
; CSU0178 := chr(159) ; Ÿ
|
||||
CSU00A7 := chr(167) ; §
|
||||
CSU00B0 := chr(176) ; °
|
||||
CSU00B2 := chr(178) ; ²
|
||||
CSU00B3 := chr(179) ; ³
|
||||
; CSU00B4 := chr(180) ; ´
|
||||
CSU00B5 := chr(181) ; µ
|
||||
CSU00C4 := chr(196) ; Ä
|
||||
CSU00D6 := chr(214) ; Ö
|
||||
CSU00DC := chr(220) ; Ü
|
||||
CSU00DF := chr(223) ; ß
|
||||
CSU00E4 := chr(228) ; ä
|
||||
CSU00F6 := chr(246) ; ö
|
||||
CSU00FC := chr(252) ; ü
|
||||
CSU00FF := chr(255) ; ÿ
|
||||
|
||||
CSSSh_L := "LShift"
|
||||
CSSSh_R := "RShift"
|
||||
CSSCaps := "CapsLock"
|
||||
CSS_Del := "Delete"
|
||||
CSS_Ins := "Insert"
|
||||
CSS__Up := "Up"
|
||||
CSSDown := "Down"
|
||||
CSSRght := "Right"
|
||||
CSSLeft := "Left"
|
||||
CSSPgUp := "PgUp"
|
||||
CSSPgDn := "PgDn"
|
||||
CSSHome := "Home"
|
||||
CSS_End := "End"
|
||||
CSS_F9 := "F9"
|
||||
CSS_F10 := "F10"
|
||||
CSS_F11 := "F11"
|
||||
CSS_F12 := "F12"
|
||||
|
||||
CSSN__0 := "Numpad0"
|
||||
CSSN__1 := "Numpad1"
|
||||
CSSN__2 := "Numpad2"
|
||||
CSSN__3 := "Numpad3"
|
||||
|
||||
CSSN__4 := "Numpad4"
|
||||
CSSN__5 := "Numpad5"
|
||||
CSSN__6 := "Numpad6"
|
||||
|
||||
CSSN__7 := "Numpad7"
|
||||
CSSN__8 := "Numpad8"
|
||||
CSSN__9 := "Numpad9"
|
||||
|
||||
CSSNDiv := "NumpadDiv"
|
||||
CSSNMul := "NumpadMult"
|
||||
CSSNSub := "NumpadSub"
|
||||
CSSNAdd := "NumpadAdd"
|
||||
CSSNDot := "NumpadDot"
|
||||
CSSNEnt := "NumpadEnter"
|
||||
|
||||
CSSNDel := "NumpadDel"
|
||||
CSSNIns := "NumpadIns"
|
||||
CSSN_Up := "NumpadUp"
|
||||
CSSN_Dn := "NumpadDown"
|
||||
CSSN_Ri := "NumpadRight"
|
||||
CSSN_Le := "NumpadLeft"
|
||||
CSSNPUp := "NumpadPgUp"
|
||||
CSSNPDn := "NumpadPgDn"
|
||||
CSSNHom := "NumpadHome"
|
||||
CSSNEnd := "NumpadEnd"
|
||||
CSSNClr := "NumpadClear"
|
21
windows/neo-vars/src/Source/tray.ahk
Normal file
21
windows/neo-vars/src/Source/tray.ahk
Normal file
|
@ -0,0 +1,21 @@
|
|||
if (iconBenutzen)
|
||||
menu,tray,icon,%ResourceFolder%\neo_enabled.ico,,1
|
||||
menu,tray,nostandard
|
||||
menu,tray,add,Öffnen,open
|
||||
menu,helpmenu,add,About,about
|
||||
menu,helpmenu,add,Autohotkey-Hilfe,help
|
||||
menu,helpmenu,add
|
||||
menu,helpmenu,add,http://autohotkey.com/,autohotkey
|
||||
menu,helpmenu,add,http://www.neo-layout.org/,neo
|
||||
menu,tray,add,Hilfe,:helpmenu
|
||||
menu,tray,add
|
||||
menu,tray,add,%disable%,togglesuspend
|
||||
menu,tray,add
|
||||
menu,tray,add,Bearbeiten,edit
|
||||
menu,tray,add,Neu Laden,reload
|
||||
menu,tray,add
|
||||
menu,tray,add,Nicht im Systray anzeigen,hide
|
||||
menu,tray,add,%name% beenden, exitprogram
|
||||
menu,tray,default,%disable%
|
||||
menu,tray,tip,%name%
|
||||
|
65
windows/neo-vars/src/Source/trayfunctions.ahk
Normal file
65
windows/neo-vars/src/Source/trayfunctions.ahk
Normal file
|
@ -0,0 +1,65 @@
|
|||
togglesuspend:
|
||||
if A_IsSuspended {
|
||||
menu, tray, rename, %enable%, %disable%
|
||||
menu, tray, tip, %name%
|
||||
if (iconBenutzen)
|
||||
menu, tray, icon, %ResourceFolder%\neo_enabled.ico,,1
|
||||
suspend , off ; Schaltet Suspend aus -> NEO
|
||||
} else {
|
||||
menu, tray, rename, %disable%, %enable%
|
||||
menu, tray, tip, %name% : Deaktiviert
|
||||
if (iconBenutzen)
|
||||
menu, tray, icon, %ResourceFolder%\neo_disabled.ico,,1
|
||||
suspend , on ; Schaltet Suspend ein -> QWERTZ
|
||||
}
|
||||
return
|
||||
|
||||
help:
|
||||
Run, %A_WinDir%\hh mk:@MSITStore:autohotkey.chm
|
||||
return
|
||||
|
||||
about:
|
||||
msgbox, 64, %name% – Ergonomische Tastaturbelegung,
|
||||
(
|
||||
%name%
|
||||
`nDas Neo-Layout ersetzt das übliche deutsche
|
||||
Tastaturlayout mit der Alternative Neo,
|
||||
beschrieben auf http://neo-layout.org/.
|
||||
`nDazu sind keine Administratorrechte nötig.
|
||||
`nWenn Autohotkey aktiviert ist, werden alle Tastendrucke
|
||||
abgefangen und statt dessen eine Übersetzung weitergeschickt.
|
||||
`nDies geschieht transparent für den Anwender,
|
||||
es muss nichts installiert werden.
|
||||
`nDie Zeichenübersetzung kann leicht über das Icon im
|
||||
Systemtray deaktiviert werden. `n
|
||||
)
|
||||
return
|
||||
|
||||
neo:
|
||||
run http://neo-layout.org/
|
||||
return
|
||||
|
||||
autohotkey:
|
||||
run http://autohotkey.com/
|
||||
return
|
||||
|
||||
open:
|
||||
ListLines ; shows the Autohotkey window
|
||||
return
|
||||
|
||||
edit:
|
||||
edit
|
||||
return
|
||||
|
||||
reload:
|
||||
Reload
|
||||
return
|
||||
|
||||
hide:
|
||||
menu, tray, noicon
|
||||
return
|
||||
|
||||
exitprogram:
|
||||
exitapp
|
||||
return
|
||||
|
628
windows/neo-vars/src/Source/varsfunctions.ahk
Normal file
628
windows/neo-vars/src/Source/varsfunctions.ahk
Normal file
|
@ -0,0 +1,628 @@
|
|||
#NoEnv
|
||||
|
||||
AllStar(This_HotKey) {
|
||||
global
|
||||
PhysKey := This_HotKey
|
||||
if (SubStr(PhysKey,1,1) == "*")
|
||||
PhysKey := SubStr(PhysKey,2)
|
||||
if (SubStr(PhysKey,-2) == " up") {
|
||||
PhysKey := SubStr(PhysKey,1,StrLen(PhysKey)-3)
|
||||
IsDown := 0
|
||||
} else
|
||||
IsDown := 1
|
||||
ActKey := TransformKey(PhysKey)
|
||||
if ((striktesMod2Lock == 0) && (NOC%ActKey% == 1))
|
||||
Ebene := EbeneNC
|
||||
else
|
||||
Ebene := EbeneC
|
||||
if (Ebene7 and (CP7%ActKey% != ""))
|
||||
Char := CP7%ActKey%
|
||||
else if (Ebene8 and (CP8%ActKey% != ""))
|
||||
Char := CP8%ActKey%
|
||||
else
|
||||
Char := CP%Ebene%%ActKey%
|
||||
if (IsPressHooked == 1) {
|
||||
if (IsDown == 1)
|
||||
PressHookProc(PressHookRoutine, PhysKey, ActKey, Char)
|
||||
else
|
||||
CharStarUp(PhysKey)
|
||||
} else if (IsDown == 1)
|
||||
CharStarDown(PhysKey, ActKey, Char)
|
||||
else
|
||||
CharStarUp(PhysKey)
|
||||
}
|
||||
|
||||
CharStarDown(PhysKey, ActKey, char) {
|
||||
global
|
||||
wasNonShiftKeyPressed := 1
|
||||
if (PP%PhysKey% != "")
|
||||
CompNew := PP%PhysKey% ; Von Tastaturwiederholung
|
||||
else
|
||||
CompNew := Comp . char ; Hängen wir mal das neue Zeichen zum Compositum an
|
||||
|
||||
if (CD%CompNew% != "") { ; Compose hat getroffen: wird geschickt, Compose gelöscht
|
||||
tosend := CD%CompNew%
|
||||
PP%PhysKey% := CompNew
|
||||
Comp := ""
|
||||
} else if (CM%CompNew% == 1) { ; Compose muss sich noch was merken: Jetzt noch nichts schicken.
|
||||
tosend := ""
|
||||
PP%PhysKey% := ""
|
||||
Comp := CompNew
|
||||
} else if (Comp == "") { ; noch kein Zeichen in der Compose-Queue: Ein einzelnes Zeichen wird geschickt
|
||||
tosend := char
|
||||
PP%PhysKey% := char
|
||||
} else { ; Compose hat verfehlt: nichts schicken, auch aktuelles Zeichen nicht schicken
|
||||
tosend := ""
|
||||
PP%PhysKey% := ""
|
||||
Comp := ""
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (strlen(tosend) > 5) { ; Ausgabe mehrerer Zeichen
|
||||
if (PR%PhysKey% != "") { ; Eventuell vergessenen Key-Release aufräumen
|
||||
CharOutUp(PR%PhysKey%)
|
||||
PR%PhysKey% := ""
|
||||
}
|
||||
|
||||
loop {
|
||||
if (SubStr(tosend,1,1)=="P") {
|
||||
CharProc(SubStr(tosend,2,4))
|
||||
} else {
|
||||
CharOut(SubStr(tosend,1,5))
|
||||
}
|
||||
tosend := SubStr(tosend,6)
|
||||
if (tosend == "")
|
||||
break ; erledigt
|
||||
}
|
||||
} else if (tosend != "") {
|
||||
if (SubStr(tosend,1,1)=="P") {
|
||||
if (PR%PhysKey% != "") {
|
||||
CharOutUp(PR%PhysKey%)
|
||||
PR%PhysKey% := ""
|
||||
}
|
||||
CharProc(SubStr(tosend,2))
|
||||
} else {
|
||||
if ((PR%PhysKey% != "") and (PR%PhysKey% != tosend))
|
||||
CharOutUp(PR%PhysKey%)
|
||||
PR%PhysKey% := tosend
|
||||
CharOutDown(tosend)
|
||||
}
|
||||
} else if (PR%PhysKey% != "") {
|
||||
CharOutUp(PR%PhysKey%)
|
||||
PR%PhysKey% := ""
|
||||
}
|
||||
}
|
||||
|
||||
CharStarUp(PhysKey) {
|
||||
global
|
||||
if (PR%PhysKey% != "") {
|
||||
tosend := PR%PhysKey%
|
||||
PR%PhysKey% := ""
|
||||
if (SubStr(tosend,1,1)=="P")
|
||||
CharProc(SubStr(tosend,2))
|
||||
else
|
||||
CharOutUp(tosend)
|
||||
}
|
||||
PP%PhysKey% := ""
|
||||
}
|
||||
|
||||
|
||||
CharOut(char) {
|
||||
global
|
||||
if (DecodeUnicodeNext == 1) {
|
||||
DecodeUnicodeNext := 0
|
||||
TrayTip,Unicode-Zeichen,%char%,10,1
|
||||
}
|
||||
if (DNCS%char% != "")
|
||||
SendBlindShiftFixed(DNCS%char% . UPCS%char%)
|
||||
else if (CS%char% != "")
|
||||
SendBlindShiftFixed("{" . CS%char% . "}")
|
||||
else
|
||||
SendUnicodeChar("0x" . SubStr(char,2))
|
||||
}
|
||||
|
||||
CharOutDown(char) {
|
||||
global
|
||||
if (DecodeUnicodeNext == 1) {
|
||||
DecodeUnicodeNext := 0
|
||||
TrayTip,Unicode-Zeichen,%char%,10,1
|
||||
}
|
||||
if (DNCS%char% != "")
|
||||
SendBlindShiftFixed(DNCS%char%)
|
||||
else if (CS%char% != "")
|
||||
SendBlindShiftFixed("{" . CS%char% . " down}")
|
||||
else
|
||||
SendUnicodeCharDown("0x" . SubStr(char,2))
|
||||
}
|
||||
|
||||
CharOutUp(char) {
|
||||
global
|
||||
if (DNCS%char% != "") {
|
||||
if (UPCS%char% != "")
|
||||
SendBlindShiftFixed(UPCS%char%)
|
||||
} else if (CS%char% != "")
|
||||
SendBlindShiftFixed("{" . CS%char% . " up}")
|
||||
else
|
||||
SendUnicodeCharUp("0x" . SubStr(char,2))
|
||||
}
|
||||
|
||||
SendBlindShiftFixed(theseq) {
|
||||
global
|
||||
if (UNSH%char%)
|
||||
if (IsShiftLPressed)
|
||||
if (IsShiftRPressed)
|
||||
send % "{blind}{RShift Up}{Shift Up}" . theseq . "{Shift Down}{RShift Down}"
|
||||
else
|
||||
send % "{blind}{Shift Up}" . theseq . "{Shift Down}"
|
||||
else
|
||||
if (IsShiftRPressed)
|
||||
send % "{blind}{RShift Up}" . theseq . "{RShift Down}"
|
||||
else
|
||||
send % "{blind}" . theseq
|
||||
else
|
||||
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`, Mod4+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`, Mod4+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`, Mod4+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 Mod4+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
|
||||
; 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
|
||||
; 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`, Mod4+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()
|
||||
}
|
||||
}
|
||||
|
||||
PressHookProc(HookRoutine, PhysKey, ActKey, Char) {
|
||||
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
|
||||
}
|
||||
|
||||
SendUnicodeChar(charCode){
|
||||
IfWinActive,ahk_class gdkWindowToplevel
|
||||
{
|
||||
StringLower,charCode,charCode
|
||||
send % "^+u" . SubStr(charCode,3) . " "
|
||||
} else {
|
||||
static ki := "#"
|
||||
if (ki =="#") {
|
||||
VarSetCapacity(ki,28*2,0)
|
||||
DllCall("RtlFillMemory","uint",&ki+ 0,"uint",1,"uint",1)
|
||||
DllCall("RtlFillMemory","uint",&ki+28+0,"uint",1,"uint",1)
|
||||
}
|
||||
DllCall("ntdll.dll\RtlFillMemoryUlong","uint",&ki+ 6,"uint",4,"uint",0x40000|charCode) ;KEYEVENTF_UNICODE
|
||||
DllCall("ntdll.dll\RtlFillMemoryUlong","uint",&ki+28+6,"uint",4,"uint",0x60000|charCode) ;KEYEVENTF_KEYUP|KEYEVENTF_UNICODE
|
||||
DllCall("SendInput","UInt",2,"UInt",&ki,"Int",28)
|
||||
}
|
||||
}
|
||||
|
||||
SendUnicodeCharDown(charCode){
|
||||
IfWinActive,ahk_class gdkWindowToplevel
|
||||
{
|
||||
StringLower,charCode,charCode
|
||||
send % "^+u" . SubStr(charCode,3) . " "
|
||||
} else {
|
||||
static ki := "#"
|
||||
if (ki =="#") {
|
||||
VarSetCapacity(ki,28,0)
|
||||
DllCall("RtlFillMemory","uint",&ki,"uint",1,"uint",1)
|
||||
}
|
||||
DllCall("ntdll.dll\RtlFillMemoryUlong","uint",&ki+6,"uint",4,"uint",0x40000|charCode) ;KEYEVENTF_UNICODE
|
||||
DllCall("SendInput","UInt",1,"UInt",&ki,"Int",28)
|
||||
}
|
||||
}
|
||||
|
||||
SendUnicodeCharUp(charCode){
|
||||
IfWinActive,ahk_class gdkWindowToplevel
|
||||
{
|
||||
; nothing
|
||||
} else {
|
||||
static ki := "#"
|
||||
if (ki =="#") {
|
||||
VarSetCapacity(ki,28,0)
|
||||
DllCall("RtlFillMemory","uint",&ki,"uint",1,"uint",1)
|
||||
}
|
||||
DllCall("ntdll.dll\RtlFillMemoryUlong","uint",&ki+6,"uint",4,"uint",0x60000|charCode) ;KEYEVENTF_KEYUP|KEYEVENTF_UNICODE
|
||||
DllCall("SendInput","UInt",1,"UInt",&ki,"Int",28)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in a new issue