Commit Graph

37 Commits

Author SHA1 Message Date
Přemysl Eric Janouch 18d16c1edb
Add clang-format configuration, clean up 2021-10-30 02:53:18 +02:00
Přemysl Eric Janouch 2d777dd67e Rewrite the mouse API
I wasn't aware of the fact that 1000, 1002 and 1003 are mutually
exclusive and turn each other off.

Also now it's not needed to set the protocol, it gets set by default.
2014-11-19 03:19:13 +01:00
Přemysl Eric Janouch e98d9c0fd1 Rename to termo 2014-10-14 00:08:15 +02:00
Přemysl Eric Janouch 5692f32bcf CMake-ify, rename to termkey2 for the time being 2014-10-09 23:47:24 +02:00
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 ff8d714142 Print UTF-8/RAW mode on startup; print 'Key ' before normal keys to debug UTF-8 parse errors 2014-01-23 23:56:41 +00:00
Paul LeoNerd Evans 0be6f18019 Handle ANSI and DEC mode report CSIs 2012-11-30 16:34:47 +00:00
Paul LeoNerd Evans c00f6cd3c6 Only recognise DECCPR as a position report, so it is distinct from F3 2012-11-30 16:12:26 +00:00
Paul LeoNerd Evans ca4d98b0f7 Have demo.c request cursor position on '?'; print position reports and mouse nicer 2012-04-25 18:32:18 +01:00
Paul LeoNerd Evans 84378bcba8 Allow setting mouse encoding protocol from demo 2012-04-12 01:08:12 +01:00
Paul LeoNerd Evans 6bc3f8a378 \e string escape is not portable; use \033 2012-01-18 16:36:10 +00:00
Paul LeoNerd Evans 427a98693e optarg and friends want _XOPEN_SOURCE 600, and <unistd.h> - Petr Pavlu 2011-08-25 22:49:51 +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 e90d8f45d7 demo.c needs to enable CTRLC flag to shut down mouse mode on exit 2011-04-26 08:28:26 +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 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 7459a038fb Make demo enable mouse mode if given on commandline 2009-11-24 01:30:52 +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 eee8ddcee3 Linefeed properly in main() in demo files 2008-12-08 22:54: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 247fae6a72 Gracefully handle constructor failure rather than SEGV 2008-10-09 22:41:07 +01:00
Paul LeoNerd Evans a61b916c18 Adjustment to demo.c; just print the vim style format 2008-10-08 02:06:00 +01:00
Paul LeoNerd Evans 0b8680daa4 Added TERMKEY_FORMAT_WRAPBRACKET 2008-10-06 22:33:49 +01:00
Paul LeoNerd Evans 5b24e42d90 Added two more formatting options; CARETCTRL and ALTISMETA 2008-10-06 22:22:09 +01:00
Paul LeoNerd Evans a06d010504 Added termkey_snprint_key() to render nice string outputs of key events 2008-08-21 20:20:07 +01:00
Paul LeoNerd Evans 95e87a86d5 Reworked events to be type/code/mod rather than flags/code/mod; make F[n] keys their own (parametric) type, rather than using keysyms for them 2008-08-21 20:05:17 +01:00
Paul LeoNerd Evans eb2fed629d Cope correctly with XTerm's modified Unicode reporting of Ctrl-C for termination 2008-02-23 23:17:31 +00:00
Paul LeoNerd Evans 9dfd4f1116 Renamed describe_sym to get_keyname 2008-02-23 20:28:18 +00:00
Paul LeoNerd Evans 46e53d124d Moved termios magic out of demo.c into termkey.c where it belongs 2008-02-23 20:26:04 +00:00
Paul LeoNerd Evans 8f8e96f015 Implemented termkey_free() 2008-02-23 20:07:48 +00:00
Paul LeoNerd Evans dda9be9110 More termios settings on startup, to ensure reporting of signal, flow control, and NL/CR keys 2008-02-23 19:43:05 +00:00
Paul LeoNerd Evans 46ef83fdf4 Nicer names for modifiers on printed output 2008-02-23 19:37:27 +00:00
Paul LeoNerd Evans 63ed80a897 Reworking of CSI/SS3/CSIfunc recognition; use registered numbers + names for keys, rather than hardcoded 2008-02-07 02:21:14 +00:00
Paul LeoNerd Evans 6294cca6f9 Denote general status with return codes, not special key symbols 2008-02-07 01:17:59 +00:00
Paul LeoNerd Evans a503403226 Initial attempt 2008-02-07 00:58:41 +00:00