Keyboard shortcut trigger interrupt

Is it possible to define a keyboard shortcut that is interruptible?

I would like shift + space to trigger an action, but if shift is followed by anything except a space, then the shortcut should NOT continue to wait for a space to be pressed.

The reason is that it's quite easy to accidentally trigger because shift is used naturally when typing. In this sequence:

  • [hold shift], [press number key], [space], [release shift]

The action is unintentionally triggered because I am holding shift+space at some point. However, this was not the intention because I was actually typing a special key that required shift, but I just did not release shift before continuing to type a space.

This could work with a key sequence. If another key is pressed between shift and space, the sequence is not fulfilled (interrupted) and is not triggered. I hope I have understood you correctly. :slightly_smiling_face:

Thanks for the reply!

This almost works, but unfortunately key sequences don't block input so it seems the space sometimes gets sent to the OS on its own, which performs an unwanted action.

From the Key Sequence help text:

In contrast to keyboard shortcuts, key sequences do not block the input but analyze it constantly.

you could setup an additional keyboard shortcut which blocks the shortcut but does nothing else