I use an alternative keyboard layout that uses CapsLock and # as ISO_Level3_Shift modifiers.
setxkbmap de koy
I also like using CapsLock as additional Escape key when it's just tapped. This can be easily reached by:
xcape -e "ISO_Level3_Shift=Escape"
But this makes both Level3 modifiers act as Escape. How can I apply xcape only to the left modifier key (labeled CapsLock)?