| Description: |
When binding on motion events and looking the event %s state value to determine what modifier keys (shift, ctrl, alt, ...) are held down I get different results when Alt is held down on different platforms. On Mac X11 Tk 8.5.2 the state value is 512 w/o any modifier keys and 512 + 8 with the standard macbook pro keyboard alt key held down. On Mac Aqua Tk 8.5.2 I get 1024 with no modifiers and 1024 + 16 with Alt key pressed. On Windows XP Home 32-bit I get 256 w/o any modifier and 256 + 131072 with left alt key pressed (Dell keyboard).
On these platforms and also linux, the shift and ctrl modifiers use the same mask in the state field (1 for shift, 4 for ctrl).
When the alt key is held during a motion event the same bit in the event state should be set on all platforms.
Several messages on the web describe this problem and the contortions others have gone through to work around this problem:
http://wiki.tcl.tk/4238
http://www.faqts.com/knowledge_base/view.phtml/aid/4281
|