I have a canvas with a rectangle and I want to detect if someone pressed the rectangle together with a key (ie "shift").
If you want to handle multiple combinations of modifier keys (alt, shift, control, meta, etc) you can bind to <1>
and examine the state
attribute of the event object. However, there are platform dependencies that make that problematic. I personally find making individual bindings easier and more straight-forward.
For more on how to use the event.state
attribute, see check if modifier key is pressed in tkinter