New to python here and using the curses import. I want to detect key combinations like ALT+F and similar. Currently, I am using getch()
to receive a key and then printing it in a curses window. The value does not change for F or ALT+F. How can I detect the ALT key combinations?
import curses
def Main(screen):
foo = 0
while foo == 0:
ch = screen.getch()
screen.addstr (5, 5, str(ch), curses.A_REVERSE)
screen.refresh()
if ch == ord('q'):
foo = 1
curses.wrapper(Main)