diff options
author | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2008-02-10 17:41:13 +0000 |
---|---|---|
committer | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2008-02-10 17:41:13 +0000 |
commit | dc9672603ad197e7d80beaed6b6c7834c393ab3d (patch) | |
tree | 6f33c53a15aa15d55e3e16acd7ac745c470021fd /termkey.h | |
parent | 96adbe9741bdc77d4f83242756d41187045fb172 (diff) | |
download | termo-dc9672603ad197e7d80beaed6b6c7834c393ab3d.tar.gz termo-dc9672603ad197e7d80beaed6b6c7834c393ab3d.tar.xz termo-dc9672603ad197e7d80beaed6b6c7834c393ab3d.zip |
Define an 'int' typedef called termkey_keysym to use as keysym values
Diffstat (limited to 'termkey.h')
-rw-r--r-- | termkey.h | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -85,9 +85,11 @@ enum { TERMKEY_KEYMOD_CTRL = 0x04, }; +typedef int termkey_keysym; + typedef struct { int modifiers; - int code; + termkey_keysym code; // Or Unicode codepoint int flags; /* Any Unicode character can be UTF-8 encoded in no more than 6 bytes, plus @@ -115,13 +117,13 @@ void termkey_pushinput(termkey_t *tk, unsigned char *input, size_t inputle void termkey_advisereadable(termkey_t *tk); // Registration of keys and names -int termkey_register_keyname(termkey_t *tk, int code, const char *name); +termkey_keysym termkey_register_keyname(termkey_t *tk, termkey_keysym code, const char *name); -int termkey_register_csi_ss3(termkey_t *tk, int code, unsigned char cmd, const char *name); -int termkey_register_ss3kpalt(termkey_t *tk, int code, unsigned char cmd, const char *name, char kpalt); -int termkey_register_csifunc(termkey_t *tk, int code, int number, const char *name); +termkey_keysym termkey_register_csi_ss3(termkey_t *tk, termkey_keysym code, unsigned char cmd, const char *name); +termkey_keysym termkey_register_ss3kpalt(termkey_t *tk, termkey_keysym code, unsigned char cmd, const char *name, char kpalt); +termkey_keysym termkey_register_csifunc(termkey_t *tk, termkey_keysym code, int number, const char *name); -const char *termkey_describe_sym(termkey_t *tk, int code); +const char *termkey_describe_sym(termkey_t *tk, termkey_keysym code); #endif |