I stand by my original position; don't use single character keys as triggers in apps you'll be typing in.
However, it's a free country/world, so here's a macro along the lines of what @Frankb is referring to.
It types 1, 2, 3 or 4 when those keys are tapped. When they're held for slightly longer, they perform actions. The timeout that determines the length of a 'long press' is quite short by default, so it still feels nice and snappy. Replace the red comment actions with whatever you want them to do.
1-2-3-4 - Long Press.kmmacros (53 KB)
Side-note: @peternlewis, it would be really handy if you could click the disclosure triangle of one action in a Switch/Case group while holding a modifier (maybe ⌃⌥?) to disclose all actions it contains.