How to determine if alt / option key is enabled in GTK on Mac OS X?

I want to detect if the alt / option key is pressed during mouse drag in GTK on Mac OS X. I am using pygtk. Usually holding down alt will add MOD1_MASK to event.state, but alt doesn't affect event.state at all. In key click events, the alt is shown as gtk.keysyms.kana_switch, but this is not enough for my purposes as the user can press alt in another app and switch to mine by clicking.

Is there a setting available that will cause the alt / parameter to appear as a modifier in event.state? Alternatively, is there a way to determine if the key is currently located even if the keypress event has passed to another application?

+1


source to share


1 answer


I think you should use gtk.accelerator_get_default_mod_mask()


http://library.gnome.org/devel/gtk/unstable/checklist-modifiers.html



0


source







All Articles