From ed931c9a397e0f9fda1866191d22f87fd539e45a Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 30 Apr 2012 07:21:38 +0000 Subject: Send special key events for individual modifier key presses (X11 for now). Improve documentation. --- pugl_test.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'pugl_test.c') 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; } } -- cgit v1.2.3