termparser

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

termparser

TermParser #
ANSI Terminal escape sequence parser.
This parser is loose implementation of Paul Flo Williams' VT500-series parser.
It take a lot of ideas from the annes project, and
extends it in some areas.
This library is part of the termKit
project.
Features #
Still is a works in progress, but the following features are implemented:

Normal key mode
Enhanced key mode (Kitty protocol)
Mouse tracking
Cursor position report
Focus events
Color query requests
Device attributes
Bracketing paste
and more...

Usage #
This is a simple example how to get started with the package.
final parser = Parser();
// ESC [ 20 ; 10 R
parser.advance([0x1B, 0x5B, 0x32, 0x30, 0x3B, 0x31, 0x30, 0x52]);
assert(parser.moveNext(), 'unable to get next sequence');
assert(parser.current == const CursorPositionEvent(20, 10), 'retrieve event');
assert(parser.moveNext() == false, 'no more events');
copied to clipboard
Acknowledgements #
This package is strongly influenced by the following projects:

annes
vaxis

License #
termparser is licensed under the MIT license.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.