There is a tap/toggle function: "tap 300 1"
tap
When the input is activated for less than 500 ms and released, the output will be activated for 100 ms as the input is released. If the input is activated for longer than 500 ms, the output remains off. Can be used along with delay_on to allow a single sip/puff/lip input to control two outputs. Two optional parameters allow control of the time period that determines the tap detection and the duration of the pulse when a tap is detected. The default parameters are equivalent to "tap 500 100". This function will clear any associated toggle or latch or delay_off when the input activates.
If the second parameter is exactly 1, the output will toggle on/off each time the input is activated for less than the delay period.
There is a corresponding delay_on/toggle function, that works the same way, too:
delay_on
Will prevent the output from turning on for a period of time (in ms) after an input goes active. The default delay is 1000 ms. An optional parameter can control the delay. If an optional second parameter is present, the output will pulse for the duration of the second parameter and turn off. By default the output will stay on as long as the input is active. This function can be used to sequence up to six keyboard keys from one input.
If the second parameter is exactly 1, the output will toggle on/off each time the input is activated for longer than the delay period.