diff options
Diffstat (limited to 'intern/ghost')
-rw-r--r-- | intern/ghost/GHOST_Types.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/intern/ghost/GHOST_Types.h b/intern/ghost/GHOST_Types.h index 78fc3f69c7a..2b5e96a1bf7 100644 --- a/intern/ghost/GHOST_Types.h +++ b/intern/ghost/GHOST_Types.h @@ -466,8 +466,19 @@ typedef struct { typedef struct { /** The key code. */ GHOST_TKey key; + + /* ascii / utf8: both should always be set when possible, + * - ascii may be '\0' however if the user presses a non ascii key + * - unicode may not be set if the system has no unicode support + * + * These values are intended to be used as follows. + * For text input use unicode when available, fallback to ascii. + * For areas where unicode is not needed, number input for example, always + * use ascii, unicode is ignored - campbell. + */ /** The ascii code for the key event ('\0' if none). */ char ascii; + /** The unicode character. if the length is 6, not NULL terminated if all 6 are set */ char utf8_buf[6]; } GHOST_TEventKeyData; |