Skip to content

Conversation

@monoamine11231
Copy link

What is this?
This is an implementation for parsing ANSI APC (Application Program Control) sequences into a new event type. The event type in the enum Event is named for ApplicationProgramControl and holds a string. ANSI APC sequences have the form of:

<ESC>_<STRING><ESC>\

The parsing method is implemented only for the parser-unix submodule as it's used only in the UNIX-sphere (see below).

Why?
The Kitty terminal uses APC sequences to encode status responses for the transfer and display of image data to and by the terminal. Currently there are no other solutions for parsing APC sequences by the crossterm package and such APC sequences sent, e.g by the Kitty terminal, are represented as a sequence of key-presses; see #834.

The only possibility for the end-user to parse such APC sequences with the crossterm package is to write an additional parser on top of the produced KeyEvent sequence which is not optimal.

Discussion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant