summaryrefslogtreecommitdiffstats
path: root/windows
diff options
context:
space:
mode:
authormösi <mösi@b9310e46-f624-0410-8ea1-cfbb3a30dc96>2009-02-13 17:40:01 +0000
committermösi <mösi@b9310e46-f624-0410-8ea1-cfbb3a30dc96>2009-02-13 17:40:01 +0000
commit46f5d785b87833c98117e32ee1a8af5d14c1faea (patch)
tree8484a8ce29c6e29dc2c74b3377fe287930e1f6ec /windows
parentffcf37f840e17382d3b6931e3803fc07b5d67e95 (diff)
WieMitNeo wird jetzt in einer modalen MessageBox ausgegeben, die mehr Platz erzaubt als ein TrayTip (laut AHK-Dokumentation max. 255 Zeichen). Sollte aber auf GUI geändert werden.
Jede Compose-Sequenz wird zwei mal ausgegeben: Einmal als Zeichensequenz, das andere Mal als Tastensequenz. git-svn-id: https://svn.neo-layout.org@1658 b9310e46-f624-0410-8ea1-cfbb3a30dc96
Diffstat (limited to 'windows')
-rw-r--r--windows/neo-vars/src/source/keydefinitions.ahk43
-rw-r--r--windows/neo-vars/src/source/shortcuts.ahk14
-rw-r--r--windows/neo-vars/src/source/tools.ahk79
3 files changed, 88 insertions, 48 deletions
diff --git a/windows/neo-vars/src/source/keydefinitions.ahk b/windows/neo-vars/src/source/keydefinitions.ahk
index bdbd389..8bca428 100644
--- a/windows/neo-vars/src/source/keydefinitions.ahk
+++ b/windows/neo-vars/src/source/keydefinitions.ahk
@@ -110,6 +110,17 @@ ED1("VKBFSC02B","PM3RD") ; Mod3R (#')
ED1("VKE2SC056","PM4LD") ; Mod4L (<>)
ED1("VKA5SC138","PM4RD") ; Mod4R (AltGr)
+SetKeyPos(pos,char) {
+ global
+ current := %pos%
+ if (current != "")
+ StringReplace,CRK%current%,CRK%current%,% " " . pos . " ",% " "
+ if (SubStr(CRK%char%,0) != " ")
+ CRK%char% .= " "
+ CRK%char% .= pos . " "
+ %pos% := char
+}
+
ED(pos,caps,e1,e2,e3,e4,e5,e6,e7="",e8="") {
global
if (caps == 0)
@@ -118,30 +129,14 @@ ED(pos,caps,e1,e2,e3,e4,e5,e6,e7="",e8="") {
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
- if (e1 != "")
- CRK%e1% .= " " . e1
- if (e2 != "")
- CRK%e2% .= " S__M2" . e1
- if (e3 != "")
- CRK%e3% .= " S__M3" . e1
- if (e4 != "")
- CRK%e4% .= " S__M4" . e1
- if (e5 != "")
- CRK%e5% .= " S__M5" . e1
- if (e6 != "")
- CRK%e6% .= " S__M6" . e1
- if (e7 != "")
- CRK%e7% .= " S__M7" . e1
- if (e8 != "")
- CRK%e8% .= " S__M8" . e1
+ SetKeyPos("CP1" . pos,e1)
+ SetKeyPos("CP2" . pos,e2)
+ SetKeyPos("CP3" . pos,e3)
+ SetKeyPos("CP4" . pos,e4)
+ SetKeyPos("CP5" . pos,e5)
+ SetKeyPos("CP6" . pos,e6)
+ SetKeyPos("CP7" . pos,e7)
+ SetKeyPos("CP8" . pos,e8)
}
EDN(pos1,pos2,caps,e1,e2,e3,e4,e5,e6) {
diff --git a/windows/neo-vars/src/source/shortcuts.ahk b/windows/neo-vars/src/source/shortcuts.ahk
index 4d58722..8a08281 100644
--- a/windows/neo-vars/src/source/shortcuts.ahk
+++ b/windows/neo-vars/src/source/shortcuts.ahk
@@ -226,13 +226,13 @@ UNSHU00B5 := 1 ; µ
/*
Jetzt noch ein paar Verschönerungsabkürzungen
*/
-CBS__M2 := "(Shift)+"
-CBS__M3 := "(Mod3)+"
-CBS__M4 := "(Mod4)+"
-CBS__M5 := "(Mod5=Shift+Mod3)+"
-CBS__M6 := "(Mod6=Mod3+Mod4)+"
-CBS__M7 := "(Mod7=Shift+Mod4)+"
-CBS__M8 := "(Mod8=Shift+Mod3+Mod4)+"
+CBS__M2 := "Shift+"
+CBS__M3 := "Mod3+"
+CBS__M4 := "Mod4+"
+CBS__M5 := "Mod5=Shift+Mod3+"
+CBS__M6 := "Mod6=Mod3+Mod4+"
+CBS__M7 := "Mod7=Shift+Mod4+"
+CBS__M8 := "Mod8=Shift+Mod3+Mod4+"
CBSComp := "Compose"
CBTAcut := "Akut"
diff --git a/windows/neo-vars/src/source/tools.ahk b/windows/neo-vars/src/source/tools.ahk
index 8410fce..38a42ee 100644
--- a/windows/neo-vars/src/source/tools.ahk
+++ b/windows/neo-vars/src/source/tools.ahk
@@ -513,38 +513,83 @@ SetFormat,Integer,h
a += 256*b
SetFormat,Integer,d
a := "U" . substr("0000" . substr(a,3),-3)
- wtt := CRC%a% . " " . CRK%a% . " "
- if (wtt=="") {
- TrayTip,Wie mit NEO,Keine Information`, wie %a% eingegeben werden kann!,10,1
- return
- }
-; MsgBox,% wtt
- wmn := ""
- loop,parse,wtt,%A_Space%
+ wmn := "Das Zeichen " . a . " kann wie folgt eingegeben werden:`r`n"
+ loop,parse,CRC%a%,%A_Space%
{
this_wmn := ""
+ this_wmnk := ""
+ nthis := 0
this_wtt := A_LoopField
if (this_wtt == "")
continue ; probably at first or last entry
loop {
if (this_wtt == "")
break
- this_char := substr(this_wtt,1,5)
+ this_char5 := substr(this_wtt,1,5)
+ this_char := this_char5
this_wtt := substr(this_wtt,6)
if (CB%this_char% != "")
this_char := CB%this_char%
else if (CS%this_char% != "")
this_char := CS%this_char%
; this_char will contain Uxxxx if no shortcut is present. Fix this here.
- if (substr(this_char,-1) == ")+")
- this_wmn .= this_char
- else if (substr(this_wmn,-1) == ")+")
- this_wmn .= "<" . this_char . ">"
- else
- this_wmn .= " <" . this_char . ">"
+ this_wmn .= " <" . this_char . ">"
+ if (CRK%this_char5% == "") {
+ nthis := 1
+ this_wmnk .= " <" . this_char5 . ">"
+ } else
+ this_wmnk .= " " . KeyLong(CRK%this_char5%)
}
- wmn .= this_wmn . "`r`n"
+ if (this_wmn != "")
+ this_wmn := SubStr(this_wmn,2)
+ if (this_wmnk != "")
+ this_wmnk := SubStr(this_wmnk,2)
+ if (nthis == 1)
+ wmn .= "Wegen fehlender Tastenbelegung: Nicht als Compose:`r`n"
+ else
+ wmn .= "Als Compose:`r`n"
+ wmn .= this_wmn . "`r`noder`r`n" . this_wmnk . "`r`n`r`n"
+ }
+
+ wmnk := KeyLong(CRK%a%)
+ if (wmnk != "")
+ wmn .= "Als Tastendruck:`r`n" . wmnk
+ else
+ wmn .= "Als Tastendruck nicht verfügbar!"
+
+ if (wmn != "")
+ MsgBox,0,Wie mit NEO,% wmn
+ else
+ TrayTip,Wie mit NEO,Keine Information über %a% gefunden,10,1
+}
+
+KeyLong(key) {
+ global
+ num := 0
+ twmnk := ""
+ loop,parse,key,%A_Space%
+ {
+ tis_wmn := ""
+ tis_wtt := A_LoopField
+ if (tis_wtt == "")
+ continue ; probably at first or last entry
+ tis_layer := substr(tis_wtt,3,1)
+ base_key_pos := "CP1" . substr(tis_wtt,4)
+
+ base_key := %base_key_pos%
+ if (CB%base_key% != "")
+ base_key := CB%base_key%
+ else if (CS%base_key% != "")
+ base_key := CS%base_key%
+
+ twmnk .= "/<" . CBS__M%tis_layer% . base_key . ">"
+ num := num + 1
}
- TrayTip,Wie mit NEO,% wmn,10,1
+ if (num == 0)
+ return ""
+ else if (num == 1)
+ return SubStr(twmnk,2)
+ else
+ return "(" . SubStr(twmnk,2) . ")"
}