in 2025, "shift" shows up in event.modifiers, so your onClick function can simply check there and return if shift is not present.
if "shift" not in event.modifiers:
return
this is much simpler than setting a global shift_is_held flag as was previously done