The 'event generate' command seems to not be triggering
bindings on the target widget. For example, with the
following code, typing 'a' in the first entry wiget
should cause a <key-b> event to insert a b into the
second entry widget:
entry .e1
entry .e2
pack .e1
pack .e2
bind .e1 <Key-a> "event generate .e2 <Key-b> ; break"
Logged In: YES
user_id=6331
Upon further testing, this may not be specific to Aqua. I
have this problem also under Linux, at the least.
Logged In: YES
user_id=79902
The place that <Key> events are delivered to depends upon
the focus, and this is normally a Very Good Thing Indeed.
Are you sure that you've not got that messed up somehow? (I
normally stay away from doing key-event generation to
anywhere other than the current window precisely because
getting the focus right is hard.)
Logged In: YES
user_id=6331
I could indeed be incorrect about how the behavior should
work here. I checked my original program, and it DOES focus
on the other widget first before sending the event. I
tested the below revised script and it does work in Windows
and Linux, inserting a 'b' into .e2. It doesn't seem to
work for MacOS X Aqua though.
entry .e1
entry .e2
pack .e1
pack .e2
bind .e1 <Key-a> "focus .e2 ; event generate .e2 <Key-b> ;
break"
Logged In: YES
user_id=1312539
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).