| Jeff Godfrey 2005-04-20, 4:00 pm |
| I have bound a script to the <<ListboxSelect>> virtual event of the standard
Tk listbox widget. The event seems to fire whenever the selection changes
via the keyboard or a direct mouse click- which is good. I have the need,
though, to tell those two situations apart in the bound event.
That is, I need to know whether the event was fired by a mouse click or a
keyboard traversal of the list. Several of the substitution characters
available to the bind command look promising, though they don't seem to be
passed through when the virtual event is fired. More specifically, the
values passed for every promising substitution character I tried was the
same for a mouse click versus a keyboard traversal.
What's the correct way to tell these two situations apart?
Thanks,
Jeff
|