Sujet : Re: bind
De : manfred (at) *nospam* antispam.at (Manfred Stelzhammer)
Groupes : comp.lang.tclDate : 07. Apr 2025, 20:13:25
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vt184l$bcn7$1@dont-email.me>
References : 1 2 3
User-Agent : Mozilla Thunderbird
Hi
Now I found the solution:
I added a "focus .top.f".
Now it works like expected.
proc tuwas {K W} {
puts "$K : $W"
if {$W ne ".top.f"} {
if {$K eq "b1"} {
event generate .top.f <Button-1>
}
if {$K eq "Down"} {
focus .top.f
event generate .top.f <KeyPress-$K>
}
}
}
regards
Manfred
Am 07.04.25 um 19:29 schrieb Manfred Stelzhammer:
Thanks
I changed the script:
##
proc tuwas {cmd W} {
puts "$cmd : $W"
if {$W ne ".top.f"} {
if {$cmd eq "b1"} {event generate .top.f <Button-1> }
if {$cmd eq "down"} {
event generate .top.f <KeyPress-Down>
break
}
}
}
##
But it doesn't change anything.
reagards
Manfred
Am 07.04.25 um 19:15 schrieb Harald Oehlmann:
Consider to use "break" as last command of your binding script.
This avoids to call any following binding scripts.