diff options
author | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2008-02-09 19:30:37 +0000 |
---|---|---|
committer | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2008-02-09 19:30:37 +0000 |
commit | daed589b5c2c0935787754ff3402aca68a820802 (patch) | |
tree | 0df41bcb37d34e565616e30a374df018caa5c282 /termkey.h | |
parent | 64d0b4cb703ce7a55b6d72d89bd8b355a5a93a5d (diff) | |
download | termo-daed589b5c2c0935787754ff3402aca68a820802.tar.gz termo-daed589b5c2c0935787754ff3402aca68a820802.tar.xz termo-daed589b5c2c0935787754ff3402aca68a820802.zip |
Handle (normal cases) of UTF-8 - still doesn't handle C1/UTF-8 range yet
Diffstat (limited to 'termkey.h')
-rw-r--r-- | termkey.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -90,9 +90,9 @@ typedef struct { int code; int flags; - /* Any Unicode character can be UTF-8 encoded in no more than 5 bytes, plus + /* Any Unicode character can be UTF-8 encoded in no more than 6 bytes, plus * terminating NUL */ - char utf8[6]; + char utf8[7]; } termkey_key; typedef struct termkey termkey_t; @@ -100,6 +100,8 @@ typedef struct termkey termkey_t; enum { TERMKEY_FLAG_NOINTERPRET = 0x01, // Do not interpret C0//G1 codes if possible TERMKEY_FLAG_CONVERTKP = 0x02, // Convert KP codes to regular keypresses + TERMKEY_FLAG_RAW = 0x04, // Input is raw bytes, not UTF-8 + TERMKEY_FLAG_UTF8 = 0x08, // Input is definitely UTF-8 }; termkey_t *termkey_new(int fd, int flags); |