termparser 0.1.1 copy "termparser: ^0.1.1" to clipboard
termparser: ^0.1.1 copied to clipboard

ANSI Terminal escape sequence parser for terminal applications.

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.

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');

Acknowledgements #

This package is strongly influenced by the following projects:

License #

termparser is licensed under the MIT license.

0
likes
0
pub points
36%
popularity

Publisher

verified publishernetflux.com.ar

ANSI Terminal escape sequence parser for terminal applications.

Homepage
Repository (GitHub)
View/report issues

Topics

#console #terminal #ansi #parser

Documentation

Documentation

License

unknown (license)

Dependencies

equatable, meta

More

Packages that depend on termparser