diff options
author | David Robillard <d@drobilla.net> | 2016-09-01 22:27:23 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2016-09-01 22:27:23 -0400 |
commit | 93242ef59b807419cf9ebe81c90829e90f1b518c (patch) | |
tree | 2214109526090814fcd07f153b100456ab03e1e4 | |
parent | 02d2704a0be7443907f5752c00b71feb58cc11dd (diff) |
Make it possible to multiplex PuglKey and chars
This is useful when working with existing code that assumes any key can
be expressed in a single integer. Raises the question of whether Pugl's
design of representing special keys separately at all is sensible, but
c'est la vie.
-rw-r--r-- | pugl/common.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pugl/common.h b/pugl/common.h index 6109fe2..df57dc8 100644 --- a/pugl/common.h +++ b/pugl/common.h @@ -84,9 +84,14 @@ typedef enum { /** Special (non-Unicode) keyboard keys. + + The numerical values of these symbols occupy a reserved range of Unicode + points, so it is possible to express either a PuglKey value or a Unicode + character in the same variable. This is sometimes useful for interfacing + with APIs that do not make this distinction. */ typedef enum { - PUGL_KEY_F1 = 1, + PUGL_KEY_F1 = 0xE000, PUGL_KEY_F2, PUGL_KEY_F3, PUGL_KEY_F4, |