Caps word and caps shift that work with Runtime macros

I encountered some challengers getting a caps shift working that played nicely with the runtime macros (the shift aspect) here are what I found works for me:

Caps word
Mapped to space so that shift plus space triggers the caps word with puts everything in CAPS until space is hit again.

ifShift goTo 4
ifRegEq 5 1 setReg 5 0
ifNotShift tapKey space
tapKey space
pressKey LS-
setReg 5 1
ifRegEq 5 1 goTo @0

Caps shift:
Mapped to shift, double tap of shift turns on caps. Double tap turns off.

holdKey iLS-
ifNotDoubletap break
pressKey capsLock
delayUntil 400
releaseKey capsLock```