record pressed key in log file

Hi everyone,
I’m new to the forum and to TouchDesigner in general.
I was wondering if there’s a way to record the keys I press — both from a keyboard and an Xbox controller — into a log file .txt.
What I’d like to have is a list of all the keys pressed during an open TouchDesigner session.
Ideally, it would update in real time, but even generating a final log once I stop a “recording” session would be perfectly fine.
Does anyone know if there’s a way to do this?
Thanks in advance!

Hi @desmond_miles,

for keyboard input check out the Keyboard In DAT and connected callbacks. For the XBox controller you will have to make use of a CHOP Execute DAT.

For both input’s you can write the retrieved values to a Table DAT which in turn can be written out using a File Out DAT.

Hope this helps
cheers
Markus

1 Like