Ideally, I would like to capture the keys sent to a specific program (and only to that program) e.g. Dwarf Fortress. [and later send keystrokes to only that program - which is easier to do]
A workaround would be to run the application in Docker or a VM and capture all keystrokes with something like [logkeys][1]
but it would be more preferable to have a wrapper or some other approach for the specific application.
I am looking to structure a solution to this problem.Should I be using device drivers? (But how would I limit it to only that application?) or is there something specific I should be aware of e.g. Python / C already has that ... why not just use keytrace
etc?