Commit Graph

71 Commits

Author SHA1 Message Date
Přemysl Eric Janouch 0bfb13655c
Implement de/focus event parsing
So far there is no way to set it up, I'm not sure how to go about it.
2020-09-14 17:55:41 +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 0b5d8ecd0d Fix xterm cursor key modifiers 2015-07-25 19:46:42 +02:00
Přemysl Eric Janouch dc7b9efd71 Make cursor keys work better 2015-07-25 19:05:00 +02:00
Přemysl Eric Janouch 477f732bc3 Fix SS3 keysyms 2015-07-25 19:02:57 +02:00
Přemysl Eric Janouch d49fbadd67 Fix off-by-one bug 2015-05-28 20:16:55 +02:00
Přemysl Eric Janouch bc0a71f082 Finally fix all tests
While still supporting rxvt shifted keys.
2015-05-28 20:02:14 +02:00
Přemysl Eric Janouch be1cccd252 Mark an issue that breaks tests 2015-05-27 21:42:21 +02:00
Přemysl Eric Janouch c628a434f6 Fix the 31position test 2015-05-27 21:36:50 +02:00
Přemysl Eric Janouch 11b4d7cb4f Fix rxvt shifted keys and OOB array access 2015-05-26 21:59:44 +02:00
Přemysl Eric Janouch e8b9c654af Mark a TODO 2014-11-30 00:36:18 +01:00
Přemysl Eric Janouch 2f8a39ed64 Better support for rxvt input 2014-11-19 00:42:59 +01:00
Přemysl Eric Janouch 86025fcf6f Rewrite termo_interpret_mouse() 2014-10-18 20:32:45 +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 e330d751a4 Make mode 1015 and 1006 work, prepare for 1005 2014-10-13 23:39: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 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 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 efc5b7e088 Try to handle position reports -and- F3 concurrently.. somehow.. argh 2012-11-30 15:36:06 +00:00
Paul LeoNerd Evans 8152f9e018 Bugfix to argless CSIs; present 0 arguments, not 1 whose value is -1 2012-11-30 15:31:04 +00:00
Paul LeoNerd Evans d08c0844a4 Slightly more generic custom CSI handling - name functions just after the letter they parse, so we can multiplex on 'cmd' or other things 2012-11-30 15:23:41 +00:00
Paul LeoNerd Evans fdb44d9796 Moved the other termkey_interpret_*() functions into driver-csi.c where they arguably belong 2012-11-30 15:01:20 +00:00
Paul LeoNerd Evans d5c3d9c8fe Also interpret an intermediate CSI byte if present 2012-11-30 14:43:00 +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 d241d6216a Split out the actual CSI parser into its own function, separate from peekkey_csi 2012-11-30 13:52:56 +00:00
Paul LeoNerd Evans 06fd040119 Bugfix to POSITION reporting - swap line<=>col 2012-04-25 18:34:47 +01:00
Paul LeoNerd Evans f06cd325a2 Ensure that key->type field is properly set for all mouse encoding protocols 2012-04-24 17:42:01 +01: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 6645ee9718 Neater CSI driver; dispatch command handlers from an array 2012-04-24 16:33:13 +01:00
Paul LeoNerd Evans a6aa8c433b Always load the CSI driver because it contains cross-terminal mouse and CSI u handling 2012-04-24 15:58:37 +01:00
Paul LeoNerd Evans f33513282a Created abstract accessors for getting/setting key event line/col counts 2012-04-24 15:25:17 +01:00
Paul LeoNerd Evans 8cf0858276 Use spare bits in code.mouse[3] to store bigger mouse positions 2012-04-12 17:02:45 +01:00
Paul LeoNerd Evans 60b4bfaf72 Recognise SGR-style mouse encoding 2012-04-12 00:19:10 +01:00
Paul LeoNerd Evans ff99b29b96 Recognise rxvt-style mouse encoding 2012-04-12 00:12:19 +01:00
Paul LeoNerd Evans ee12c698da Document the errors set by termkey_new(), use errno rather than fprintf() to stderr 2012-01-29 16:13:38 +00:00
Paul LeoNerd Evans 2a82ab2f1b Mark new driver-csi internal variables as static so they don't result in linkable symbols 2012-01-22 18:54:17 +00:00
Paul LeoNerd Evans 62b8773108 Fix another printf() %c char 2012-01-20 18:13:37 +00:00
Paul LeoNerd Evans 08b7eaa5b7 Since CSI key info is the same for every CSI driver, just store one static copy of it rather than one for every termkey instance - simplifies construct-time allocation 2012-01-20 18:01:19 +00:00
Paul LeoNerd Evans 4f5d529760 fprintf() %c wants char, not unsigned char 2012-01-20 17:03:54 +00:00
Paul LeoNerd Evans 41e9e0d39e Also handle new 'fixterms' spec CSI codepoint;modifiers u encoding 2011-05-09 16:43:05 +01:00
Paul LeoNerd Evans 6dc2b9c72b Implement mouse catching also in CSI driver, in case xterm-alike terminal without 'key_mouse' terminfo string 2009-11-26 00:33:30 +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 62c5c97080 Make CSI driver's debugging output messages on unrecognised sequences conditional on #ifdef DEBUG 2008-11-12 13:02:30 +00:00
Paul LeoNerd Evans 927eaabae9 CSI driver shouldn't eat sequences it doesn't understand; leave them for another driver 2008-11-12 12:51:19 +00:00