I'm attempting to control my arduino nano with my keyboard, essentially I want it to respond to me every time I click something on my keyboard and for the data to be sent through a python program running on my pc which routes to the arduino through serial even when I'm not in the Python console actively running the program. For example: I'm playing a video game and I press space, I want the python script to know I pressed a button and send the data of the button through serial for the arduino to run off.
Asked
Active
Viewed 51 times
0
-
1Possible duplicate of [Detecting a keypress in python while in the background](https://stackoverflow.com/questions/33863921/detecting-a-keypress-in-python-while-in-the-background) – babaliaris May 20 '19 at 01:39
-
gathering keyboard data is called "keyloging" So you can search in Google "keylogging" or "keylogger". See also [listener in pynput](https://pythonhosted.org/pynput/keyboard.html#monitoring-the-keyboard) – furas May 20 '19 at 01:39