Make dialog easier to get out of

This commit is contained in:
Russell Schmidt
2025-01-17 12:55:43 -06:00
parent 94e7e8f628
commit fe1eaacee9

View File

@@ -33,7 +33,8 @@ def dialog(stdscr, title, message):
# Get user input
while True:
char = win.getch()
if char == curses.KEY_ENTER or char == 10 or char == 13:
# Close dialog with enter, space, or esc
if char in(curses.KEY_ENTER, 10, 13, 32, 27):
win.clear()
win.refresh()
return