summaryrefslogtreecommitdiff
path: root/windows/autohotkey/Source/Methods-Other.ahk
diff options
context:
space:
mode:
Diffstat (limited to 'windows/autohotkey/Source/Methods-Other.ahk')
-rw-r--r--windows/autohotkey/Source/Methods-Other.ahk60
1 files changed, 55 insertions, 5 deletions
diff --git a/windows/autohotkey/Source/Methods-Other.ahk b/windows/autohotkey/Source/Methods-Other.ahk
index b603a8b..a330c9a 100644
--- a/windows/autohotkey/Source/Methods-Other.ahk
+++ b/windows/autohotkey/Source/Methods-Other.ahk
@@ -1,13 +1,15 @@
-deadAsc(val) {
+deadAsc(val, a) {
global
if !DeadSilence
send % val
+ DeadKey := a
}
-deadUni(val) {
+deadUni(val, a) {
global
if !DeadSilence
SendUnicodeChar(val)
+ DeadKey := a
}
undeadAsc(val) {
@@ -70,7 +72,10 @@ CheckDeadUni12(d,val1,val2) {
CheckCompAsc(d,val) {
global
if (PriorCompKey == d) {
+ if !DeadCompose
+ send {bs}
send % val
+ isSecondCompKey = 0
return 1
}
}
@@ -79,10 +84,16 @@ CheckCompAsc12(d,val1,val2) {
global
if (PriorCompKey == d)
if (Ebene = 1) and (val1 != "") {
+ if !DeadCompose
+ send {bs}
send % val1
+ isSecondCompKey = 0
return 1
} else if (Ebene = 2) and (val2 != "") {
+ if !DeadCompose
+ send {bs}
send % val2
+ isSecondCompKey = 0
return 1
}
}
@@ -90,7 +101,11 @@ CheckCompAsc12(d,val1,val2) {
CheckCompUni(d,val) {
global
if (PriorCompKey == d) {
+ PriorCompKey =
+ if !DeadCompose
+ send {bs}
SendUnicodeChar(val)
+ isSecondCompKey = 0
return 1
}
}
@@ -99,10 +114,18 @@ CheckCompUni12(d,val1,val2){
global
if (PriorCompKey == d) {
if (Ebene = 1) and (val1 != "") {
+ PriorCompKey =
+ if !DeadCompose
+ send {bs}
SendUnicodeChar(val1)
+ isSecondCompKey = 0
return 1
} else if (Ebene = 2) and (val2 != "") {
+ PriorCompKey =
+ if !DeadCompose
+ send {bs}
SendUnicodeChar(val2)
+ isSecondCompKey = 0
return 1
}
}
@@ -111,7 +134,11 @@ CheckCompUni12(d,val1,val2){
CheckComp3Uni(d,val) {
global
if (PriorCompKey == d) {
+ PriorCompKey =
+ if !DeadCompose
+ send {bs}{bs}
SendUnicodeChar(val)
+ isSecondCompKey = 0
return 1
}
}
@@ -120,30 +147,53 @@ CheckComp3Uni12(d,val1,val2) {
global
if (PriorCompKey == d) {
if (Ebene = 1) and (val1 != "") {
+ PriorCompKey =
+ if !DeadCompose
+ send {bs}{bs}
SendUnicodeChar(val1)
+ isSecondCompKey = 0
return 1
} else if (Ebene = 2) and (val2 != "") {
+ PriorCompKey =
+ if !DeadCompose
+ send {bs}{bs}
SendUnicodeChar(val2)
+ isSecondCompKey = 0
return 1
}
}
}
-outputChar(val1,val2) {
+OutputChar(val) {
+ global
+ if !((CheckComp(val) or PriorCompKey) and DeadCompose)
+ send % "{blind}" . val
+}
+
+OutputChar12(val1,val2) {
global
if (Ebene = 1)
c := val1
else c := val2
- if !(CheckComp(c) and DeadCompose or PriorCompKey)
+ if !((CheckComp(c) or PriorCompKey) and DeadCompose)
if GetKeyState("Shift","P") and isMod2Locked
send % "{blind}{Shift Up}" . c . "{Shift Down}"
else send % "{blind}" . c
}
-checkComp(d) {
+CheckComp(d) {
global
if (PriorDeadKey = "comp") {
CompKey := d
return 1
+ } else if isSecondCompKey {
+ isSecondCompKey = 0
+ CompKey =
+ PriorCompKey =
+ ;goto neo_%lastHook%
+ } else if PriorCompKey {
+ CompKey := PriorCompKey . "_" . d
+ isSecondCompKey = 1
+ return 1
}
}