TextInput event + Modifiers

Is there any way to get text input events even when modifiers are held down?

I want to make a key binding in a crossplatform way for <C-!> but I can’t use the key down events to do it because I don’t know what the keyboard mapping is for !. Similarly I can’t use the text input events because the control modifier causes text input to fail.

So I’m at a loss. I can manually write out the binding for ! for a qwerty keyboard, but then people using other layouts would get weird behaviour.

Any help?

Yeah – I don’t think that’s ever really going to work. If you want to be portable, you really need to just abandon the idea of control key sequences that use “hidden” shift keys. Instead of “control-!” it really just needs to be defined as “control-shift-1” (or whatever you decide to go with).

As far as I can tell, the text input events only return basic characters. Even something as simple as Tab doesn’t generate a text input event.

1 Like