Modifier keys with UI buttons

i'd like to use modifier keys (such as shift, ctrl, alt, etc) to modify the script that gets executed when clicking on a custom UI button.

anyone know how to test for modifier keys on button click?

if you attach a popMenu to a UI element such as a button, then you can check for modifier keys then. just have the postmenu command flag callthe script u want.

is there a command that can querry the keys that are pressed down? if so then you could use that.

thanks a lot, it worked like a charm.