From 023ebd9432a1dc93f0a4d45021c775bcaf0141bf Mon Sep 17 00:00:00 2001 From: nickedyer Date: Sun, 19 Feb 2023 16:15:27 -0500 Subject: [PATCH] allow quitting with the esc key --- thermopi/screen.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/thermopi/screen.py b/thermopi/screen.py index b4a23e9..57874f3 100644 --- a/thermopi/screen.py +++ b/thermopi/screen.py @@ -22,6 +22,9 @@ def main(windowed_mode): running = False if event.type == pygame.MOUSEBUTTONDOWN: running = False + if event.type == pygame.KEYDOWN: + if event.key == pygame.K_ESCAPE: + running = False pygame.display.flip()