Commit Graph

57 Commits

Author SHA1 Message Date
Přemysl Eric Janouch 2518b53e5a
Fix usage of a nonstandard escape sequence 2023-06-14 16:23:08 +02:00
Přemysl Eric Janouch 8265f075b1
Fix mouse when key_mouse contains 1006 sequence 2021-11-04 14:14:56 +01:00
Přemysl Eric Janouch 94a77a10d8
Ensure we turn off focus tracking on exit 2021-06-29 05:28:04 +02:00
Přemysl Eric Janouch d39c35e59e
Enable focus tracking opportunistically 2021-06-29 05:10:33 +02:00
Přemysl Eric Janouch d47bcfb203
Make note of urxvt 9.25's 1006 support 2021-06-29 05:00:43 +02:00
Přemysl Eric Janouch 059cb81817
Try to fix terminfo loading
It could lead to crashing the PTY under OpenBSD and ncurses.

Fixed some unibiliums leaks while at it.
2016-11-03 02:36:35 +01:00
Přemysl Eric Janouch 4282f3715c
Fix cursor keys etc. in unibilium
unibi_pkey_xmit was the wrong constant.
2016-09-27 23:59:51 +02:00
Přemysl Eric Janouch 9b7c801c37
Make unibilium work at all 2016-07-24 00:27:25 +02:00
Přemysl Eric Janouch f05e40a30a Don't interpret an n*<Esc> as (n-1)*<Alt>-<Esc> 2015-08-09 14:52:02 +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 f1f9a00cda Add support for setting the mouse protocol 2014-10-22 22:23:01 +02:00
Přemysl Eric Janouch 828f03a063 Get rid of most block comments
They're rather difficult to maintain.
2014-10-14 21:19:20 +02:00
Přemysl Eric Janouch e98d9c0fd1 Rename to termo 2014-10-14 00:08:15 +02:00
Přemysl Eric Janouch 456093e4ed Work on mouse support, it's a mess 2014-10-13 01:03:13 +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 cac1f8373b Less code duplication 2014-09-23 03:05:01 +02:00
Přemysl Eric Janouch c0cc27c555 Introduce isatty(3) 2014-09-23 03:05:01 +02:00
Přemysl Eric Janouch 75d3388a35 Introduce bsearch(3) 2014-09-23 03:05:01 +02:00
Přemysl Eric Janouch 56f7847ce3 Add -Wextra 2014-09-23 03:05:01 +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 2ed8bae4f6 Don't try to write() the start/stop string if the fd is a pipe, because this will never work 2012-01-20 20:01:11 +00:00
Paul LeoNerd Evans 052738b8f4 Allow {start,stop}_driver to fail, abort constructor, have driver-ti try to write the entire start/stop string or error out on -1 2012-01-20 17:00:09 +00:00
Paul LeoNerd Evans 8d2fa34a52 (void)-cast calls to write() in driver-ti start/stop since we don't -really- care if they fail, there's not much we can do about it 2012-01-20 16:44:33 +00:00
Paul LeoNerd Evans 6d6afe788c Allow passing fd = -1 to constructor to make an instance not associated with an fd; must use push_bytes to provide it input 2012-01-18 14:03:39 +00:00
Paul LeoNerd Evans e768f02219 Optionally support unibilium for reading terminfo instead of curses 2011-09-24 00:04:01 +01:00
Paul LeoNerd Evans d8f6551972 Neaten logic by loading terminfo strings in a separate function from the constructor 2011-09-23 23:40:54 +01:00
Paul LeoNerd Evans 447a3e7ab9 strdup() needs 'define _XOPEN_SOURCE 600 - Petr Pavlu 2011-08-25 22:49:17 +01:00
Paul LeoNerd Evans 4ac0d752c4 Solaris requires #define _XPG6 2011-04-04 22:26:25 +01:00
Paul LeoNerd Evans 391f795c67 include <curses.h> before <term.h> as it's required in that order on Solaris 2011-03-30 20:24:06 +01: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 bdc22b8b3d Remember to zero key->modifiers for mouse events 2009-11-25 14:46:19 +00:00
Paul LeoNerd Evans c9d2bd93fd Implement XTerm mouse parsing in terminfo driver 2009-11-24 01:31:35 +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 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 43a99e64f2 strdup() the terminfo keypad_local and keypad_xmit strings at construct time, in case multiple instances and they change beneath us 2008-12-03 20:19:15 +00:00
Paul LeoNerd Evans 2c1bea4f15 Use a C99 flexible array member rather than the [0] hack 2008-12-02 01:05:47 +00:00
Paul LeoNerd Evans d245285df2 Cast 'term' to (non-const) char* when passing to setupterm() because terminfo's prototypes don't use const 2008-11-28 19:48:41 +00:00
Paul LeoNerd Evans fef558eeb4 Use sizeof() on assigned variables rather than types, to make code a little less fragile to type changes 2008-11-24 22:15:43 +00:00
Paul LeoNerd Evans c6ff878411 Fixed another signed-vs-unsigned int comparison in driver-ti.c 2008-11-24 22:06:14 +00:00
Paul LeoNerd Evans 14561e2a30 Only print about unrecognised terminfo variable names when debugging 2008-11-18 15:55:29 +00:00
Paul LeoNerd Evans 4a108d4916 Compress trie nodes down to extent maps after loading, to save memory 2008-11-12 23:58:20 +00:00
Paul LeoNerd Evans 754214c200 Use a trie instead of a linear list of sequence strings in the terminfo driver - nicer lookup properties 2008-11-12 16:32:17 +00:00
Paul LeoNerd Evans 04e1926df6 Handle malloc() failures during setup of driver-ti 2008-11-12 16:10:58 +00:00
Paul LeoNerd Evans 30a3356815 Implemented free_driver() in terminfo driver 2008-11-09 22:38:10 +00:00
Paul LeoNerd Evans 09edf2377f Driver getkey() can return TERMKEY_RES_NONE which attempts getkey_simple() afterwards 2008-11-09 19:45:43 +00:00
Paul LeoNerd Evans d50d772ca5 Drivers have names 2008-11-08 17:56:44 +00:00
Paul LeoNerd Evans e880602944 Pass driver_info as explicit void* parameter into driver methods 2008-11-08 17:47:57 +00:00
Paul LeoNerd Evans 1c46f5edfa Recognise 'key_mouse' as an ignored terminfo key 2008-11-02 22:16:03 +00:00
Paul LeoNerd Evans aef409c460 Terminfo driver needs to put terminal into 'keypad_xmit' mode when starting 2008-11-02 17:59:30 +00:00