aboutsummaryrefslogtreecommitdiff
path: root/pugl_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'pugl_test.c')
-rw-r--r--pugl_test.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/pugl_test.c b/pugl_test.c
index cf8da2e..da58b78 100644
--- a/pugl_test.c
+++ b/pugl_test.c
@@ -27,8 +27,6 @@ static float xAngle = 0.0f;
static float yAngle = 0.0f;
static float dist = 10.0f;
-#define KEY_ESCAPE 27
-
static void
onDisplay(PuglView* view)
{
@@ -90,7 +88,8 @@ onKeyboard(PuglView* view, bool press, uint32_t key)
{
fprintf(stderr, "Key %c %s ", (char)key, press ? "down" : "up");
printModifiers(view);
- if (key == 'q' || key == 'Q' || key == KEY_ESCAPE) {
+ if (key == 'q' || key == 'Q' || key == PUGL_CHAR_ESCAPE ||
+ key == PUGL_CHAR_DELETE || key == PUGL_CHAR_BACKSPACE) {
quit = 1;
}
}