mirror of
https://github.com/pdxlocations/contact.git
synced 2026-03-28 17:12:35 +01:00
Make dialog easier to get out of
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user