Commit Graph

61 Commits

Author SHA1 Message Date
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
Paul LeoNerd Evans 2c0d0f0f3c Bugfix to 'unknown CSI' case in CSI driver - neater output message to avoid uninitialised ints 2008-11-12 12:44:33 +00:00
Paul LeoNerd Evans 9757a73daa CSI driver should also load when TERM=screen because of screen's stupid way of blind-forwarding keypresses it doesn't understand 2008-11-09 22:41:44 +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 9969e197ba Pass 'csi' value to static helper functions in driver-csi 2008-11-08 17:43:51 +00:00
Paul LeoNerd Evans 86933f1836 Reuse common Esc-prefix code in getkey_simple() from CSI driver; avoids code duplication 2008-11-03 14:46:42 +00:00
Paul LeoNerd Evans 62d4e7eccb Pass the 'force' value through to getkey_simple() 2008-11-02 14:43:19 +00:00
Paul LeoNerd Evans fd769d621e 'int' might not be wide enough to hold any Unicode codepoint; use 'long' 2008-10-10 00:50:56 +01:00
Paul LeoNerd Evans 37156ad580 Added some TODO notes about handling realloc() failures 2008-10-09 23:53:35 +01:00