Menu

#1435 OS X Aqua: event generate fails to trigger key bindings

obsolete: 8.4.2
closed
69. Events (88)
5
2006-04-15
2003-03-09
No

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"

Discussion

  • Revar Desmera

    Revar Desmera - 2003-03-09

    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.

     
  • Donal K. Fellows

    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.)

     
  • Revar Desmera

    Revar Desmera - 2003-03-10

    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"

     
  • Don Porter

    Don Porter - 2004-03-30
    • labels: 394429 --> 69. Events
     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2006-03-31
    • status: open --> pending
     
  • SourceForge Robot

    • status: pending --> closed
     
  • SourceForge Robot

    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).