Thanks for all your ideas. Here is the solution I came up using a variable:
Macro "ShortPress" sets the variable to 1 if the key is released:
I use this Macro for all keys that need long/short press conditions. So it is defined only once but triggered by many keys.
Macro "Button" sets the variable to 0, pauses for half a second. Then if in the meantime the variable is 1 (= the key has been released and triggered Macro "ShortPress") the action for short press is executed. Otherwise (= the key has not yet been released) the action for long press is executed.
Johannes