Commit Graph

49 Commits

Author SHA1 Message Date
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
Paul LeoNerd Evans 2b08f88f19 Better free() tracking in constructor failure cases 2008-10-09 23:19:10 +01:00
Paul LeoNerd Evans 05639c4773 Pass 'term' string into new_driver virtual method; have drivers sensitive to it and return NULL if they can't handle. Try CSI driver first; only for xterm-alikes 2008-10-09 20:23:45 +01:00
Paul LeoNerd Evans e76b195c59 Moved all of the keynames out from driver-csi into termkey; where they belong 2008-10-08 02:00:22 +01:00
Paul LeoNerd Evans 10d3024a6a Pass an explicit 'force' parameter into driver's getkey rather than relying on non-zero waittime 2008-10-08 00:44:33 +01:00
Paul LeoNerd Evans ac6cae29bb Moved single byte and UTF-8 sequence recombiner out of driver-csi.c back into termkey.c 2008-10-08 00:36:27 +01:00
Paul LeoNerd Evans d46f72fc1a Moved all of the C0 registration and 'do_codepoint' logic out of driver-csi back into termkey via another protected method 'emit_codepoint' 2008-10-08 00:12:41 +01:00
Paul LeoNerd Evans 8407c53726 s/eatbytes/eat_bytes/ - nicer API name 2008-10-07 23:57:01 +01:00
Paul LeoNerd Evans 145dca73b2 Moved 'eatbytes' back into core code, put a code ptr in the termkey struct as a "protected" method 2008-10-07 22:22:59 +01:00
Paul LeoNerd Evans d7358c43af Moved CSI key registration code to be private to CSI driver 2008-10-06 23:53:25 +01:00
Paul LeoNerd Evans e3eca8d51a Use vtable in driver to indirect calls to the CSI driver 2008-10-06 23:36:14 +01:00
Paul LeoNerd Evans f5c6ecf9af Moved CSI-related code out of termkey.c into new driver-csi.c 2008-10-06 23:27:19 +01:00