How to press arrow up(or other direction) to print or do something?

I wanted to use the 'getkey' module but it only works on python 3.5 I tried using the 'keyboard' module and could only do basic keys like:

import keyboard

while (True):
    if keyboard.read_hotkey() == 'alt':

Now I want to be able to assign the arrow keys to do stuff for me.

🔴 No definitive solution yet