summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* version: 1.1.0 -> 1.1.1HEADv1.1.1mastertv5 days1-1/+1
|
* scan: return ESC [ alone as \ESC[tv5 days1-1/+0
| | | | | | Alt-[ sends ESC [ and nothing else. scan returned that as ScanKey "\ESC", dropping the [. Now it is ScanKey "\ESC[", like ESC followed by any other character.
* scan: return what was read instead of throwingtv5 days1-55/+52
| | | | | | | | | | | | | | | | | | | | | | | scan threw on input it did not expect: an escape sequence that stopped early (Alt-O sends ESC O and nothing else, a slow link splits sequences) or that contained a character outside its syntax. In a program that scans in a thread of its own, that thread died and the program stopped reading the keyboard. Likewise, an X10 mouse report that stopped early blocked until three more characters came, swallowing the keys typed meanwhile. Now every character of a sequence is read with the timeout, and when a sequence stops early or the next character does not fit, what was read so far is returned as a ScanKey. The character that did not fit stays in the handle for the next scan. For example ESC O alone is ScanKey "\ESCO", which is what Alt-O sends anyway, and ESC [ 1 followed by a newline is ScanKey "\ESC[1" followed by ScanKey "\n". SGR mouse reports are CSI sequences whose parameters start with <, so they are read like any other CSI sequence and decoded afterwards. A malformed one is returned as a ScanKey. This drops expectChar and scanNumber. Errors of the handle itself still propagate, such as end of file, or a byte that the handle's encoding cannot decode.
* decodeMouseEvent: admit buttons 8 to 11tv5 days1-10/+6
| | | | | | | | | Terminals report buttons 8 to 11 (often back and forward) with bit 128 of the button byte set. decodeMouseEvent ignored that bit and reported them as buttons 1 to 3 and as an X10 release. The case analysis is now total, so the error for unknown buttons is gone; it could not be reached anyway.
* drop `one` parsertv2026-03-191-8/+3
|
* version: 1.0.1 -> 1.1.01.1.0tv2026-03-192-11/+11
|
* shell.nix: RIPtv2026-03-191-21/+0
|
* admit SGR mouse protocoltv2026-03-071-28/+68
|
* replace Makefile by shell.nixtv2025-03-123-8/+21
|
* rename package to terminal-scannertv2025-03-121-2/+2
|
* add instance Show Scantv2015-10-172-1/+2
|
* init scanner.cabaltv2015-10-171-0/+16
|
* init Makefiletv2015-10-172-0/+8
|
* Replace Event by Scantv2015-10-171-12/+24
|
* add VT200 mouse supporttv2015-10-171-2/+28
|
* rewrite Scanner to use Eventtv2015-10-171-201/+78
|
* add Scanner.hGetKeytv2015-10-171-25/+34
|
* cleanup Scannertv2015-10-171-64/+27
|
* add Scanner.getKeytv2014-08-071-0/+8
|
* rewrite (concat $ map f xs) to (xs >>= f)tv2014-07-291-1/+1
|
* Scanner: initial commit (not activated)tv2014-07-281-0/+258
|
* initial committv2014-07-270-0/+0