'Python bind a Shift key press to a command

I would like activate a command upon shift press and another command upon shift release. I need something like ShiftPress or ShiftRelease. Any ideas? btn.bind('', lambda event, a=a: cmd(a))



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source