I'm using Python to create a simple program to trick my brother.
The idea of my program is to read any key input that he writes and output another one. For example, I press 's' letter and it outputs 'o'.
I do have the character converter working, however I now need to catch the key pressed and instantaneously return the new key to the screen.
How can I achieve this?
Thank you very much for your time
Python probably isn't the best language for this. In fact I'm pretty sure it's not possible under most circumstances. You'd need the script running all the time, I assume, which is a problem in and of itself. But a further problem is that AFAIK python can't arbitrarily modify keyboard input across the whole computer.
So you'll probably need something that can work on a lower level, such as C or C++.
Python: get pressed keyboard keys and return