Keyboard control

Hello everyone! How can you write this “if Numpad0 is pressed, do something”. I’m just new to Python and don’t know which library to use. Thank you in advance!

On UNIX-like systems (Linux, *BSD, MacOS etc) the curses module gives
you access to that stuff in a terminal.

In a GUI environment you need a GUI widget kit. Python ships with
tkinter, and there are others available.

Cheers,
Cameron Simpson cs@cskk.id.au