56 Commits (master)

Author SHA1 Message Date
Přemysl Eric Janouch 8265f075b1
Fix mouse when key_mouse contains 1006 sequence 2 years ago
Přemysl Eric Janouch 94a77a10d8
Ensure we turn off focus tracking on exit 2 years ago
Přemysl Eric Janouch d39c35e59e
Enable focus tracking opportunistically 2 years ago
Přemysl Eric Janouch d47bcfb203
Make note of urxvt 9.25's 1006 support 2 years ago
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.
7 years ago
Přemysl Eric Janouch 4282f3715c
Fix cursor keys etc. in unibilium
unibi_pkey_xmit was the wrong constant.
7 years ago
Přemysl Eric Janouch 9b7c801c37
Make unibilium work at all 7 years ago
Přemysl Eric Janouch f05e40a30a Don't interpret an n*<Esc> as (n-1)*<Alt>-<Esc> 8 years ago
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.
9 years ago
Přemysl Eric Janouch f1f9a00cda Add support for setting the mouse protocol 9 years ago
Přemysl Eric Janouch 828f03a063 Get rid of most block comments
They're rather difficult to maintain.
9 years ago
Přemysl Eric Janouch e98d9c0fd1 Rename to termo 9 years ago
Přemysl Eric Janouch 456093e4ed Work on mouse support, it's a mess 9 years ago
Přemysl Eric Janouch 5692f32bcf CMake-ify, rename to termkey2 for the time being 9 years ago
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
9 years ago
Přemysl Eric Janouch cac1f8373b Less code duplication 9 years ago
Přemysl Eric Janouch c0cc27c555 Introduce isatty(3) 9 years ago
Přemysl Eric Janouch 75d3388a35 Introduce bsearch(3) 9 years ago
Přemysl Eric Janouch 56f7847ce3 Add -Wextra 9 years ago
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.
9 years ago
Paul LeoNerd Evans 2ed8bae4f6 Don't try to write() the start/stop string if the fd is a pipe, because this will never work 12 years ago
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 12 years ago
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 12 years ago
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 12 years ago
Paul LeoNerd Evans e768f02219 Optionally support unibilium for reading terminfo instead of curses 12 years ago
Paul LeoNerd Evans d8f6551972 Neaten logic by loading terminfo strings in a separate function from the constructor 12 years ago
Paul LeoNerd Evans 447a3e7ab9 strdup() needs 'define _XOPEN_SOURCE 600 - Petr Pavlu 12 years ago
Paul LeoNerd Evans 4ac0d752c4 Solaris requires #define _XPG6 12 years ago
Paul LeoNerd Evans 391f795c67 include <curses.h> before <term.h> as it's required in that order on Solaris 12 years ago
Paul LeoNerd Evans c4bc0486d4 Moved mouse parsing code out of driver-ti.c into core termkey.c 14 years ago
Paul LeoNerd Evans bdc22b8b3d Remember to zero key->modifiers for mouse events 14 years ago
Paul LeoNerd Evans c9d2bd93fd Implement XTerm mouse parsing in terminfo driver 14 years ago
Paul LeoNerd Evans be998cef1b Renamed all type names to CamelCaseNames for visual distinctness, separate from variables/functions 14 years ago
Paul LeoNerd Evans ef669c134d Complete change of driver internals - peek and return size but don't eat bytes; eat later in getkey() 15 years ago
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 15 years ago
Paul LeoNerd Evans 2c1bea4f15 Use a C99 flexible array member rather than the [0] hack 15 years ago
Paul LeoNerd Evans d245285df2 Cast 'term' to (non-const) char* when passing to setupterm() because terminfo's prototypes don't use const 15 years ago
Paul LeoNerd Evans fef558eeb4 Use sizeof() on assigned variables rather than types, to make code a little less fragile to type changes 15 years ago
Paul LeoNerd Evans c6ff878411 Fixed another signed-vs-unsigned int comparison in driver-ti.c 15 years ago
Paul LeoNerd Evans 14561e2a30 Only print about unrecognised terminfo variable names when debugging 15 years ago
Paul LeoNerd Evans 4a108d4916 Compress trie nodes down to extent maps after loading, to save memory 15 years ago
Paul LeoNerd Evans 754214c200 Use a trie instead of a linear list of sequence strings in the terminfo driver - nicer lookup properties 15 years ago
Paul LeoNerd Evans 04e1926df6 Handle malloc() failures during setup of driver-ti 15 years ago
Paul LeoNerd Evans 30a3356815 Implemented free_driver() in terminfo driver 15 years ago
Paul LeoNerd Evans 09edf2377f Driver getkey() can return TERMKEY_RES_NONE which attempts getkey_simple() afterwards 15 years ago
Paul LeoNerd Evans d50d772ca5 Drivers have names 15 years ago
Paul LeoNerd Evans e880602944 Pass driver_info as explicit void* parameter into driver methods 15 years ago
Paul LeoNerd Evans 1c46f5edfa Recognise 'key_mouse' as an ignored terminfo key 15 years ago
Paul LeoNerd Evans aef409c460 Terminfo driver needs to put terminal into 'keypad_xmit' mode when starting 15 years ago
Paul LeoNerd Evans 62d4e7eccb Pass the 'force' value through to getkey_simple() 15 years ago