I'm trying to build a small Python program that reads the input from the user, but does not wait for the new line character.
working with Python 3.7
My requirements are:
Easy to run (No need for Sudo)
Can take every keyboard input (Including Fn or any available button)
Can work on OSX, Windows and Linux
Every keyboard input is received immediately
I took a look at several options, but every one of them had at least one requirement it did not fulfill:
- https://docs.python.org/3/tutorial/inputoutput.html - Needs line ending.
- https://pythonhosted.org/pynput/keyboard.html - Needs Sudo.
- How to Read Keyboard Input One Char at a time with a timer with Python - Not working, I think it is due to the Python version I'm using.
Any suggestion would be highly appreciated