[RFE] Improve single-quote input behavior with alternate keyboard layouts in parameter boxes

It’s been a while since typing single quotes has been mostly broken in my setups (perhaps since 2021.x), most of the time it either inputs a double single-quote or nothing, this doesn’t happen with other characters.
Please return to regular character behavior.

Never seen this. Can you describe exactly what you do. What are your system specs?

1 Like

Thanks, here’s the info:

TD 2023.11510.
Windows 10 22H2.
RTX 4090, Driver v551.61.
Keyboard is Logitech g915 connected with the wireless dongle, polling rate is 1000 Hz.
Keyboard layout is US International because I need the Latin characters, in this layout the single quote acts as a tilde, meaning that it’s ‘held’ until he next character is typed.

Testing further, the ‘sticky’ quote of the keyboard layout is the culprit, with standard US layout I don’t see the problem. There’s probably more than one layout in which the quote will act as a tilde, I think this is very much worth looking into.

BTW, you have to press SPACE after the quote for the single character to appear, this is the expected behavior.

Interesting. I’m not familiar with int’l keyboard use. Explain how you would want it to behave and what exactly is the bug?

I believe these are called ‘Dead Keys’, here’s a Wikipedia article explaining the behavior: Dead key - Wikipedia, here’s a key map for the layout I use: QWERTY - Wikipedia. I think their behavior and use is a bit more nuanced than I can utter from experience, but the gist is that dead keys, like the single or double quote, will not produce a character immediately when pressed, but ‘stick’ to the next typed key to produce a character with a suitable tilde, diaeresis, etc… Like these: áéíóú, äëïöü. In the case that the typed letter can’t be accentuated, it will produce the character of the dead key and the next character at the same time: 't 'p 'k. In the case of a SPACE, it will produce only the character of the dead key.

In TouchDesigner, they will either produce a duplicate single (or double) quote, or nothing.

It’s probably easy to get first-hand experience by installing the US - International layout.

Thanks for the extra information. We’ll see if we can reproduce it here with the International layout.

We actually did a bunch of work on similar issues that was new in the 2023 build, where we switched to using the translated character messages from windows rather than the direct key presses so that we can handle those kinds of combinations better.

The cases we were handling at that point were from some Logitech keyboard macros and the Windows QuickAccent utility. I don’t think we tried the situation you’re describing with the dead keys, so we will look at that now.

I’ll let you know what we find out.

Thanks. I will give this a try: GitHub - umanovskis/win-kbd-usint-nodead: US-International keyboard layout with no dead keys (AltGr only) for Windows and see how it goes. Not a fan to resorting to custom layouts but this will probably ease the pain a little, haha.

I did some more digging into this and I can recreate the problem using the US International layout.

It looks like, for some reason, TouchDesigner isn’t getting the properly translated messages that are expected. When the dead key is pressed, it should be sending out a WM_DEADCHAR message in place of the expected character and then after the second key it should send a WM_CHAR message with the combined character. However, we seem to be getting duplicate WM_CHAR messages instead which is why you’re seeing the two quote characters.

I haven’t found any explanation for this yet in the documentation, but I’ve made a bug report and will look into it further. If we find a fix, we will let you know.

1 Like

Thank you, hope the solution isn’t too involved.