Popular recipes by TNT http://code.activestate.com/recipes/users/4187961/2013-09-29T14:13:04-07:00ActiveState Code RecipesPyQt4 pressed modifier keys names as method argument by a decorator (Python)
2013-09-29T14:13:04-07:00TNThttp://code.activestate.com/recipes/users/4187961/http://code.activestate.com/recipes/578675-pyqt4-pressed-modifier-keys-names-as-method-argume/
<p style="color: grey">
Python
recipe 578675
by <a href="/recipes/users/4187961/">TNT</a>
(<a href="/recipes/tags/keys/">keys</a>, <a href="/recipes/tags/modifier/">modifier</a>, <a href="/recipes/tags/pyqt/">pyqt</a>).
Revision 2.
</p>
<p>This is a definition of a decorator function that checks which modifier keys are being pressed and adds a keyword argument to a method. This argument is a tuple of names (strings) of the modifier keys that have been pressed when the method was called (or triggered).</p>