aboutsummaryrefslogtreecommitdiff
path: root/termkey.h
diff options
context:
space:
mode:
authorPaul LeoNerd Evans <leonerd@leonerd.org.uk>2008-02-10 17:41:13 +0000
committerPaul LeoNerd Evans <leonerd@leonerd.org.uk>2008-02-10 17:41:13 +0000
commitdc9672603ad197e7d80beaed6b6c7834c393ab3d (patch)
tree6f33c53a15aa15d55e3e16acd7ac745c470021fd /termkey.h
parent96adbe9741bdc77d4f83242756d41187045fb172 (diff)
downloadtermo-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.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/termkey.h b/termkey.h
index d82e473..9101d09 100644
--- a/termkey.h
+++ b/termkey.h
@@ -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