aboutsummaryrefslogtreecommitdiff
path: root/termkey.c
Commit message (Collapse)AuthorAgeFilesLines
* Allow passing fd = -1 to constructor to make an instance not associated with ↵Paul LeoNerd Evans2012-01-181-1/+11
| | | | an fd; must use push_bytes to provide it input
* Added termkey_push_bytes(), a new API for providing input bytesPaul LeoNerd Evans2012-01-181-0/+23
|
* Ensure that termkey_advisereadable() just fails with errno=ENOMEM rather ↵Paul LeoNerd Evans2012-01-181-0/+6
| | | | than trying to read() zero bytes
* Avoid push_bytes() entirely by read()ing directly into tk->bufferPaul LeoNerd Evans2012-01-181-19/+7
|
* Provide new API function to determine how much buffer space remains in the ↵Paul LeoNerd Evans2012-01-181-0/+7
| | | | instance
* Remove termkey_pushinput() from external API; declare static, rename itPaul LeoNerd Evans2012-01-181-2/+2
|
* Canonicalise (a local copy of) the key structures given to termkey_keycmp() ↵Paul LeoNerd Evans2011-09-061-12/+18
| | | | before comparing them
* A few more DEBUG fprintf(stderr)s at construction timePaul LeoNerd Evans2011-09-051-1/+12
|
* Handle TERMKEY_RES_ERROR in (debugging mode) res2str()Paul LeoNerd Evans2011-09-051-0/+5
|
* Allow a flag to convert ASCII DEL into BackspacePaul LeoNerd Evans2011-08-281-0/+6
|
* Move canonicalisation flags into their own bitfield with their own accessor ↵Paul LeoNerd Evans2011-08-281-2/+26
| | | | and named constants
* Provide an explicit termkey_canonicalise() function; canonicalise Space/SP ↵Paul LeoNerd Evans2011-08-271-6/+23
| | | | in both directions
* Deleted legacy type name typedefs and declaration of termkey_snprint_key()Paul LeoNerd Evans2011-08-271-1/+4
|
* Ensure c_cc[VMIN] and c_cc[VTIME] are properly defined, because Solaris ↵Paul LeoNerd Evans2011-08-251-0/+2
| | | | seems not to set them - Petr Pavlu
* Provide a flag to return RES_ERROR even on signal (EINTR); without it, retry ↵Paul LeoNerd Evans2011-08-251-2/+12
| | | | the operation
* Provide a new result value, TERMKEY_RES_ERROR to indicate an IO error - ↵Paul LeoNerd Evans2011-08-181-4/+17
| | | | preserve errno
* Mouse position coordinates are unsignedPaul LeoNerd Evans2011-06-161-3/+3
|
* Ignore VDSUSP as a signal-sending key too, if platform defines itPaul LeoNerd Evans2011-05-281-0/+4
|
* sscanf'ing a size_t requires %znPaul LeoNerd Evans2011-05-281-1/+1
|
* Gracefully ignore read() yielding EINTR rather than bailing outPaul LeoNerd Evans2011-05-241-1/+1
|
* Use _POSIX_VDISABLE rather than hardcoded 0 to disable individual entries in ↵Paul LeoNerd Evans2011-05-241-2/+2
| | | | termios.c_cc; most BSDs use 0xff rather than 0 for this value
* Disable ISIG mode entirely if FLAG_CTRLC is setPaul LeoNerd Evans2011-05-241-3/+7
|
* Bugfix to termkey_keycmp - implement sense in correct directionPaul LeoNerd Evans2011-04-071-6/+6
|
* Bugfix termkey_strpkey parsing unicode with trailing contentPaul LeoNerd Evans2011-04-071-7/+7
|
* Provide termkey_keycmp() for sorting purposesPaul LeoNerd Evans2011-04-021-0/+26
|
* Add a couple more 'const' markings to API functions where appropriatePaul LeoNerd Evans2011-04-011-2/+2
|
* Adjust termkey_strpkey() API more like strptime(); return pointer to end of ↵Paul LeoNerd Evans2011-04-011-17/+17
| | | | recognised section, allows for stream parsing
* Provide a termkey_lookup_keyname that can do partial buffer parsingPaul LeoNerd Evans2011-04-011-6/+18
|
* Ensure strpkey can parse numbered function keysPaul LeoNerd Evans2011-04-011-1/+4
|
* Unicode codepoint is stored in key->code.codepoint, not code.numberPaul LeoNerd Evans2011-04-011-6/+4
|
* Partial implementation of termkey_strpkey(3); missing FORMAT_WRAPBRACKET and ↵Paul LeoNerd Evans2011-04-011-1/+71
| | | | TYPE_FUNCTION support
* Neater implementation of key modifier names for strfkey; put them in a ↵Paul LeoNerd Evans2011-04-011-7/+15
| | | | little table
* Extract UTF-8 sequence parser into its own function, fix bugs, apply unit testsPaul LeoNerd Evans2011-03-311-68/+77
|
* strfkey should fill in the utf8 member of a key struct if it's emptyPaul LeoNerd Evans2011-03-311-0/+2
|
* Renamed snprint_key() to strfkey(); provide redirection trampolinePaul LeoNerd Evans2011-03-311-0/+6
|
* Don't steal Ctrl-C from the kernel by default (so leave SIGINT enabled); add ↵Paul LeoNerd Evans2011-03-231-1/+6
| | | | a flag to take it if required
* Interpret space as Unicode by default, add a flag to make it symbolic insteadPaul LeoNerd Evans2011-03-231-1/+1
|
* Allow formatting the mouse position when rendering an event to a stringPaul LeoNerd Evans2009-11-271-1/+9
|
* Make DEBUG=1 mode work with mouse eventsPaul LeoNerd Evans2009-11-271-0/+8
|
* Moved code around so DEBUG=1 actually compiles againPaul LeoNerd Evans2009-11-271-51/+53
|
* Return opaque mouse events in the key structure; add a function to interpret ↵Paul LeoNerd Evans2009-11-271-6/+66
| | | | this into its component fields
* Moved mouse parsing code out of driver-ti.c into core termkey.cPaul LeoNerd Evans2009-11-261-0/+16
|
* Print Mouse() rather than shouting MOUSE()Paul LeoNerd Evans2009-11-241-1/+1
|
* Public interface for MOUSE supportPaul LeoNerd Evans2009-11-241-0/+4
|
* Bugfix to termkey_format_key() in FORMAT_CARETCTRL case when formatting ↵Paul LeoNerd Evans2009-11-231-2/+2
| | | | Ctrl-Letter
* Renamed all type names to CamelCaseNames for visual distinctness, separate ↵Paul LeoNerd Evans2009-07-151-50/+50
| | | | from variables/functions
* Represent Ctrl-letter in lowercase in the struct, so as one day to be able ↵Paul LeoNerd Evans2008-12-101-15/+31
| | | | to do Ctrl-Shift-letter. Make sure ^X notation is still capital
* Make termkey_getkey() set a peeked key structure if it returns TERMKEY_RET_AGAINPaul LeoNerd Evans2008-12-101-0/+5
|
* Complete change of driver internals - peek and return size but don't eat ↵Paul LeoNerd Evans2008-12-101-20/+31
| | | | bytes; eat later in getkey()
* Make sure only to slide buffer down when returning a real key to the user, ↵Paul LeoNerd Evans2008-12-061-7/+10
| | | | or else it might upset the meta-key logic when it returns