KC_LOCK, and then Shift. Now, Shift will be considered held until you tap it again. You can think of Key Lock as Caps Lock, but supercharged.
KEY_LOCK_ENABLE = yesin your
rules.mk. Then pick a key in your keymap and assign it the keycode
OSM(KC_LSFT)). This does not include any of the QMK special functions (except One Shot modifiers), or shifted versions of keys such as
KC_LPRN. If it's in the Basic Keycodes list, it can be held.