Issue n°1: when you press hotkey + space, the symbol itself should appear (e.g. ` + {space} = `), instead, nothing shows.
Issue n°2: when you press hokey twice, the symbol should appear twice (e.g. ` + ` = ``). As above, nothing is printed instead.
Here's a snippet of the code (much of which is the result of you guys' help):
Code: Select all
#NoEnv
;#Warn
#KeyHistory 10
SendMode Input
SetWorkingDir %A_ScriptDir%
ListLines Off
DeadKey(sym)
{
static TildeKeys := {a: "ã", Ax: "Ã", n: "ñ", Nx: "Ñ", o: "õ", Ox: "Õ", i: "ĩ", Ix: "Ĩ", u: "ũ", Ux: "Ũ", b: "ᵬ", d: "ᵭ", f: "ᵮ", m: "ᵯ", n: "ᵰ", p: "ᵱ", r: "ᵲ", s: "ᵴ", t: "ᵵ", z: "ᵶ", e: "ẽ", Ex: "Ẽ", v: "ṽ", Vx: "Ṽ", y: "ỹ", Yx: "Ỹ", Lx: "Ɫ"}
static GraveKeys := {a: "à", Ax: "À", e: "è", Ex: "È", i: "ì", Ix: "Ì", o: "ò", Ox: "Ò", u: "ù", Ux: "Ù", n: "ǹ", Nx: "Ǹ", y: "ỳ", Yx: "Ỳ"}
; ... others ...
static DeadKeys := {"~": TildeKeys, "`": GraveKeys}
Input, Char, L1
if (Char = " ") {
Send, {Raw}%sym%
return
}
; Hack to detect uppercase variants
Char .= (RegExMatch(Char, "[A-Z]") && DeadKeys[sym].HasKey(Char "x")) ? "x" : ""
SendRaw, % (DeadKeys[sym].HasKey(Char)? DeadKeys[sym][Char] : sym Char)
}
; ...
`::
DeadKey("`")
return
+`::
DeadKey("~")
return
Am I missing something stupid?