Commit Graph

119 Commits

Author SHA1 Message Date
Paul LeoNerd Evans 3008ed29d1 A few more DEBUG fprintf(stderr)s at construction time 2011-09-05 14:14:09 +01:00
Paul LeoNerd Evans 3fb6f398e9 Handle TERMKEY_RES_ERROR in (debugging mode) res2str() 2011-09-05 13:58:15 +01:00
Paul LeoNerd Evans 8793934328 Allow a flag to convert ASCII DEL into Backspace 2011-08-28 17:57:57 +01:00
Paul LeoNerd Evans 2638499648 Move canonicalisation flags into their own bitfield with their own accessor and named constants 2011-08-28 17:50:18 +01:00
Paul LeoNerd Evans 46eefda073 Provide an explicit termkey_canonicalise() function; canonicalise Space/SP in both directions 2011-08-27 19:59:02 +01:00
Paul LeoNerd Evans 83ca948d78 Deleted legacy type name typedefs and declaration of termkey_snprint_key() 2011-08-27 19:32:39 +01:00
Paul LeoNerd Evans 8efef8e088 Ensure c_cc[VMIN] and c_cc[VTIME] are properly defined, because Solaris seems not to set them - Petr Pavlu 2011-08-25 22:41:43 +01:00
Paul LeoNerd Evans 1b8234e342 Provide a flag to return RES_ERROR even on signal (EINTR); without it, retry the operation 2011-08-25 10:48:41 +01:00
Paul LeoNerd Evans 7a2b79a640 Provide a new result value, TERMKEY_RES_ERROR to indicate an IO error - preserve errno 2011-08-18 11:20:41 +01:00
Paul LeoNerd Evans b30f946117 Mouse position coordinates are unsigned 2011-06-16 17:07:47 +01:00
Paul LeoNerd Evans 6e99f8ab85 Ignore VDSUSP as a signal-sending key too, if platform defines it 2011-05-28 11:55:46 +01:00
Paul LeoNerd Evans d3f441330b sscanf'ing a size_t requires %zn 2011-05-28 11:53:00 +01:00
Paul LeoNerd Evans ac14d7b504 Gracefully ignore read() yielding EINTR rather than bailing out 2011-05-24 18:17:15 +01:00
Paul LeoNerd Evans dad0e5019c Use _POSIX_VDISABLE rather than hardcoded 0 to disable individual entries in termios.c_cc; most BSDs use 0xff rather than 0 for this value 2011-05-24 16:45:10 +01:00
Paul LeoNerd Evans 6b17f3f620 Disable ISIG mode entirely if FLAG_CTRLC is set 2011-05-24 16:40:19 +01:00
Paul LeoNerd Evans 03371bdd04 Bugfix to termkey_keycmp - implement sense in correct direction 2011-04-07 23:31:43 +01:00
Paul LeoNerd Evans 0a101ff71e Bugfix termkey_strpkey parsing unicode with trailing content 2011-04-07 20:19:34 +01:00
Paul LeoNerd Evans ad7d31ead8 Provide termkey_keycmp() for sorting purposes 2011-04-02 15:07:30 +01:00
Paul LeoNerd Evans d6d74d252f Add a couple more 'const' markings to API functions where appropriate 2011-04-01 13:55:36 +01:00
Paul LeoNerd Evans 88230407fe Adjust termkey_strpkey() API more like strptime(); return pointer to end of recognised section, allows for stream parsing 2011-04-01 13:49:20 +01:00
Paul LeoNerd Evans dbb13defb7 Provide a termkey_lookup_keyname that can do partial buffer parsing 2011-04-01 13:26:54 +01:00
Paul LeoNerd Evans a3b8804018 Ensure strpkey can parse numbered function keys 2011-04-01 10:48:15 +01:00
Paul LeoNerd Evans 59800c356b Unicode codepoint is stored in key->code.codepoint, not code.number 2011-04-01 10:41:44 +01:00
Paul LeoNerd Evans 6424282c4d Partial implementation of termkey_strpkey(3); missing FORMAT_WRAPBRACKET and TYPE_FUNCTION support 2011-04-01 00:50:51 +01:00
Paul LeoNerd Evans ee69b33c49 Neater implementation of key modifier names for strfkey; put them in a little table 2011-04-01 00:26:02 +01:00
Paul LeoNerd Evans f1b3dff4c2 Extract UTF-8 sequence parser into its own function, fix bugs, apply unit tests 2011-03-31 23:42:52 +01:00
Paul LeoNerd Evans f17f21752b strfkey should fill in the utf8 member of a key struct if it's empty 2011-03-31 14:07:55 +01:00
Paul LeoNerd Evans 26ef76349e Renamed snprint_key() to strfkey(); provide redirection trampoline 2011-03-31 11:08:43 +01:00
Paul LeoNerd Evans 9f0ef4953d Don't steal Ctrl-C from the kernel by default (so leave SIGINT enabled); add a flag to take it if required 2011-03-23 23:20:24 +00:00
Paul LeoNerd Evans a71f68dd57 Interpret space as Unicode by default, add a flag to make it symbolic instead 2011-03-23 22:17:25 +00:00
Paul LeoNerd Evans ba0c32e8d8 Allow formatting the mouse position when rendering an event to a string 2009-11-27 15:07:05 +00:00
Paul LeoNerd Evans 571e5b701f Make DEBUG=1 mode work with mouse events 2009-11-27 14:56:38 +00:00
Paul LeoNerd Evans 0ae5aea7ac Moved code around so DEBUG=1 actually compiles again 2009-11-27 14:50:58 +00:00
Paul LeoNerd Evans 24f9711846 Return opaque mouse events in the key structure; add a function to interpret this into its component fields 2009-11-27 14:36:29 +00:00
Paul LeoNerd Evans c4bc0486d4 Moved mouse parsing code out of driver-ti.c into core termkey.c 2009-11-26 00:27:58 +00:00
Paul LeoNerd Evans ceeaf717bd Print Mouse() rather than shouting MOUSE() 2009-11-24 01:25:40 +00:00
Paul LeoNerd Evans 2ba9849ab5 Public interface for MOUSE support 2009-11-24 01:22:55 +00:00
Paul LeoNerd Evans 513e0ac59b Bugfix to termkey_format_key() in FORMAT_CARETCTRL case when formatting Ctrl-Letter 2009-11-23 23:59:46 +00:00
Paul LeoNerd Evans be998cef1b Renamed all type names to CamelCaseNames for visual distinctness, separate from variables/functions 2009-07-15 20:40:44 +01:00
Paul LeoNerd Evans 215b02e77f Represent Ctrl-letter in lowercase in the struct, so as one day to be able to do Ctrl-Shift-letter. Make sure ^X notation is still capital 2008-12-10 01:34:40 +00:00
Paul LeoNerd Evans 696c145599 Make termkey_getkey() set a peeked key structure if it returns TERMKEY_RET_AGAIN 2008-12-10 00:38:21 +00:00
Paul LeoNerd Evans ef669c134d Complete change of driver internals - peek and return size but don't eat bytes; eat later in getkey() 2008-12-10 00:23:47 +00:00
Paul LeoNerd Evans c10d6f02e4 Make sure only to slide buffer down when returning a real key to the user, or else it might upset the meta-key logic when it returns 2008-12-06 00:03:48 +00:00
Paul LeoNerd Evans 97a47e9b16 Make common static function getkey(), roll functionallity of termkey_getkey{,_force}() into it 2008-12-05 23:55:44 +00:00
Paul LeoNerd Evans 2fba93b690 Added termkey_keyname2sym() to API 2008-12-02 00:56:43 +00:00
Paul LeoNerd Evans f75bdf1516 Added termkey_get_fd() to API 2008-12-01 22:36:14 +00:00
Paul LeoNerd Evans 85be2846c3 Make sure l is always initialised in termkey_snprint_key() 2008-11-24 22:05:06 +00:00
Paul LeoNerd Evans c8011f4bfd Make termkey_new_full() static for now until we expose the API fully 2008-11-24 22:03:23 +00:00
Paul LeoNerd Evans f3f4519561 Fixed some signed/unsigned integer mismatches, including one important bug 2008-11-24 21:58:55 +00:00
Paul LeoNerd Evans 4f73b850c5 Added compile-vs-runtime library version checks 2008-11-16 12:40:14 +00:00