Add CMD key to Keyboard CHOP

I created a tool in touchdesigner with an undo/redo stack in it that makes use of the standard keyboard shortcuts. Unfortunately, I can’t detect CMD-Z on MacOS without using a Panel CHOP… this works, but has the unfortunate side effect of requiring the mouse to be over the window in question, which is confusing from a UI standpoint. Adding it to the keyboard CHOP would solve this problem.

Furthermore, even when in perform mode, CMD-Z will undo things in the touch network. To me, that seems like a bug, but I’ll leave that to the developers to determine(maybe there’s a way of disabling this that I don’t know about). You probably shouldn’t be able to modify the network with keyboard shortcuts when the network editor is literally invisible. At worst, it’s something i kept forgetting about which would cause me to erase work inadvertently. At best, it makes testing a thing with undo capabilities really hard as I’d have to remember to always save the file, close touchdesigner, and reopen it in order to clear the internal undo stack before testing my tool.

We are aware of the panel vs application shortcut messiness and its on our todo (for a long, long time). I think 2021 sounds like a great time to finally fix that.

The KeyBoard In DAT will give you CMD as it was created more recently. Will add this RFE for Keyboard In CHOP.

Thanks for the quick reply! I had no idea it was in the keyboard in DAT. That totally solves my problem for now. Much appreciated.

Actually…there seems to be a bug in the keyboard in DAT that makes it unusable for this purpose. It only recognizes the first time you modify a keypress with the CMD key. For example, press CMD-C. It will recognize it. Now press it again… it recognizes the press of the CMD key but not the C. Now press C by itself. It recognizes the C. Now you can press CMD-C again. It seems like pressing the key without the modifier somehow clears the internal state.

Ah sorry Michael, have appended this issue the the first you reported. We’ll try to look at it shortly.

This is a macOS issue with the cmd key. Whenever cmd key is down, we do not get any key up events, and we only get the key down event once. I.e. if you hold down cmd, then press c repeatedly, we’ll only get one key down event for the first time c is pressed, and nothing for releasing the key. We are testing a fix in our experimental builds where we check for key states when cmd is released and update them accordingly. It is a partial fix as we still won’t know if a key is hit multiple times when cmd is being held, but at least the key states will be consistent. Thanks for the report.