diff --git a/pyxel/examples/08_triangle_api.py b/pyxel/examples/08_triangle_api.py
index <HASH>..<HASH> 100755
--- a/pyxel/examples/08_triangle_api.py
+++ b/pyxel/examples/08_triangle_api.py
@@ -36,4 +36,7 @@ while True:
         t = triangle_list.pop(0)
         draw_triangle(*t)
 
+    if pyxel.btnp(pyxel.KEY_Q):
+        pyxel.quit()
+
     pyxel.flip()
Add the quit key to the example #8