summaryrefslogtreecommitdiff
path: root/pugl_test.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-04-30 07:21:38 +0000
committerDavid Robillard <d@drobilla.net>2012-04-30 07:21:38 +0000
commited931c9a397e0f9fda1866191d22f87fd539e45a (patch)
tree9bde3af79b33d320a9c16f6baaeaf5dc2ec628bc /pugl_test.c
parentfb2ec4fd62e8218ac485c4ad1992c7e01951159d (diff)
Send special key events for individual modifier key presses (X11 for now).
Improve documentation.
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;
}
}