state bits of an event - on unix and mac

Donald Arseneau asnd at triumf.ca
Thu Apr 3 23:13:45 EST 2003


Noam Raphael <noamr at users.sourceforge.org.replace.org.with.net> writes:

>    For this I need to interpret the state variable which is generated
> for each event. The problem is that I've seen no documentation on the
> meaning of the bits of event, and I want my class to work on unix, win
> and mac, so finding it from my experience only won't be too good.

The %s state value is OS/wm dependent, so there is no standard
meaning to the bits.

Much more portable is to bind all of the modified events
(<Shift-1>, <Alt-1>, <Ctrl-1>, <Ctrl-Shift-1>, etc)

It would be a very useful enhancement if Tk gave a uniform
state string with events (most conveniently, in exactly the
format used to create bindings: "Ctrl-Shift-", or even combined
with the keysym "Ctrl-Alt-Return")

Donald Arseneau                          asnd at triumf.ca




More information about the Python-list mailing list