Commit Graph

48 Commits

Author SHA1 Message Date
Přemysl Eric Janouch 36bc6cd095 Move to iconv
That is the major change in this commit.

Also Ctrl-modified keys now should work in URxvt,
which was surprisingly trivial to achieve.

Coming up next:
 - making sure the tests still work
 - introducing CMake
2014-09-28 03:59:12 +02:00
Přemysl Eric Janouch b630bf7a5f WIP: Is mine now (^3^)
Seriously though, I've got some issues with how this thing is designed,
as well as with its formatting, and when you add the fact that the
original author wants to merge this thing into his bigger library that
also handles terminal output, which I'll kindly leave to ncurses,
it kind of makes sense for me to do this.

Manpages have been removed as they are going to become obsolete and
they're rather difficult to maintain.  If anything, there will be
Doxygen-generated documentation.

The plan is to throw away any direct UTF-8 support and support all uni-
and multibyte character encodings.  However some unrelated refactoring
is about to come first.
2014-09-23 03:05:01 +02:00
Paul LeoNerd Evans d775d2a5ae Make header compatible with C++ (from ddd7b0c5aa) [thanks o11c] 2014-03-04 13:59:53 +00:00
Paul LeoNerd Evans 8bed1fdbf0 Add TERMKEY_FORMAT_URWID shortcut [thanks Romain Chossart] 2013-08-26 18:51:29 +01:00
Paul LeoNerd Evans e9a1302e4c Delete trailing whitespace in code 2013-08-26 02:35:40 +01:00
Paul LeoNerd Evans 3b2d8eb813 Added TERMKEY_FORMAT_LOWERSPACE for strfkey() only 2013-08-26 01:32:35 +01:00
Paul LeoNerd Evans a36648e172 Added TERMKEY_FORMAT_LOWERMOD 2013-08-26 01:14:35 +01:00
Paul LeoNerd Evans 24abb0c59e Added TERMKEY_FORMAT_SPACEMOD 2013-08-26 00:56:07 +01:00
Paul LeoNerd Evans 89ac8b058c Make some more things 'const' that should be 2013-07-15 01:03:35 +01:00
Paul LeoNerd Evans 0be6f18019 Handle ANSI and DEC mode report CSIs 2012-11-30 16:34:47 +00:00
Paul LeoNerd Evans 7b3dc4be71 Return a real key type for unrecognised CSI sequences; allow accessing them by termkey_interpret_csi() 2012-11-30 14:35:23 +00:00
Paul LeoNerd Evans f5cbf9eb57 Also handle CSI R; position report replies to CSI 6n 2012-04-24 17:27:48 +01:00
Paul LeoNerd Evans 85d44442e9 Avoid the underscore in struct _TermKey 2012-03-26 18:30:04 +01:00
Paul LeoNerd Evans cb00476f09 Added a termkey_is_started() accessor; unit test it a bit 2012-03-08 21:24:39 +00:00
Paul LeoNerd Evans 43a83e6e96 Move the terminal start/stop code into their own functions, exported (undocumented for now) 2012-03-08 21:15:25 +00:00
Paul LeoNerd Evans e252c497ae Added (undocumented) termkey_set_buffer_size() 2012-02-13 23:40:42 +00:00
Paul LeoNerd Evans 5779ec3cd1 Added (undocumented) termkey_get_buffer_size() 2012-02-13 21:57:33 +00:00
Paul LeoNerd Evans ea2d3073ac Created termkey_new_abstract() 2012-01-26 12:55:16 +00:00
Paul LeoNerd Evans 3981920938 Delete trailing comma in enum{} to keep C++ happy 2012-01-18 16:29:29 +00:00
Paul LeoNerd Evans 242da047a0 Use only C89 commenting style in .h file, in case of C89 compilers or similar that want to link 2012-01-18 15:16:13 +00:00
Paul LeoNerd Evans 82ad14175c Added termkey_push_bytes(), a new API for providing input bytes 2012-01-18 13:39:50 +00:00
Paul LeoNerd Evans 9534330003 Provide new API function to determine how much buffer space remains in the instance 2012-01-18 10:04:15 +00:00
Paul LeoNerd Evans 37d8f18ab5 Remove termkey_pushinput() from external API; declare static, rename it 2012-01-18 09:36:36 +00: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 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 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 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 26ef76349e Renamed snprint_key() to strfkey(); provide redirection trampoline 2011-03-31 11:08:43 +01:00
Paul LeoNerd Evans 280047e745 Minor whitespace fixes in termkey.h.in 2011-03-31 11:06:21 +01:00
Paul LeoNerd Evans 824e7e157a Provide guarded extern "C" { ... } wrapper for C++ compilers 2011-03-30 20:32:51 +01:00
Paul LeoNerd Evans f93587a4c7 C++ compilers don't like trailing commas in enums; remove them 2011-03-30 20:31:26 +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 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 2ba9849ab5 Public interface for MOUSE support 2009-11-24 01:22:55 +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 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 4f73b850c5 Added compile-vs-runtime library version checks 2008-11-16 12:40:14 +00:00
Paul LeoNerd Evans c2dd9675d6 Store major and minor version number in Makefile; substitute #defines in termkey.h at build time 2008-11-16 12:28:38 +00:00