mirror of
https://github.com/asciinema/asciinema.git
synced 2025-12-16 03:38:03 +01:00
More precise wording around input/output in v2 doc
This commit is contained in:
@@ -125,7 +125,7 @@ For example, let's look at the following line:
|
|||||||
It represents the event which:
|
It represents the event which:
|
||||||
|
|
||||||
* happened 1.001376 sec after the start of the recording session,
|
* happened 1.001376 sec after the start of the recording session,
|
||||||
* is of type `"o"` (print to stdout, see below),
|
* is of type `"o"` (output, write to a terminal, see below),
|
||||||
* has data `"Hello world"`.
|
* has data `"Hello world"`.
|
||||||
|
|
||||||
### Supported event types
|
### Supported event types
|
||||||
@@ -140,26 +140,27 @@ A tool which interprets the event stream (web/cli player, post-processor) should
|
|||||||
ignore (or pass through) event types it doesn't understand or doesn't care
|
ignore (or pass through) event types it doesn't understand or doesn't care
|
||||||
about.
|
about.
|
||||||
|
|
||||||
#### "o" - data written to stdout
|
#### "o" - output, data written to the terminal
|
||||||
|
|
||||||
Event of type `"o"` represents printing new data to terminal's stdout.
|
Event of type `"o"` represents printing new data to terminal's stdout.
|
||||||
|
|
||||||
`event-data` is a string containing the data that was printed to a terminal. It
|
`event-data` is a string containing the data that was printed. It must be valid,
|
||||||
has to be valid, UTF-8 encoded JSON string as described
|
UTF-8 encoded JSON string as described in [JSON RFC section
|
||||||
in [JSON RFC section 2.5](http://www.ietf.org/rfc/rfc4627.txt), with all
|
2.5](http://www.ietf.org/rfc/rfc4627.txt), with any non-printable Unicode
|
||||||
|
codepoints encoded as `\uXXXX`.
|
||||||
|
|
||||||
|
#### "i" - input, data read from the terminal
|
||||||
|
|
||||||
|
Event of type `"i"` represents character typed in by the user, or more
|
||||||
|
specifically, raw data sent from a terminal emulator to stdin of the recorded
|
||||||
|
program (usually shell).
|
||||||
|
|
||||||
|
`event-data` is a string containing captured ASCII character representing a key,
|
||||||
|
or a control character like `"\r"` (enter), `"\u0001"` (ctrl-a), `"\u0003"`
|
||||||
|
(ctrl-c), etc. Like with `"o"` event, it's UTF-8 encoded JSON string, with any
|
||||||
non-printable Unicode codepoints encoded as `\uXXXX`.
|
non-printable Unicode codepoints encoded as `\uXXXX`.
|
||||||
|
|
||||||
#### "i" - data read from stdin
|
> Official asciinema recorder doesn't capture keyboard input by default. All
|
||||||
|
|
||||||
Event of type `"i"` represents character(s) typed in by the user, or
|
|
||||||
more specifically, data sent from terminal emulator to stdin of the recorded
|
|
||||||
shell.
|
|
||||||
|
|
||||||
`event-data` is a string containing the captured character(s). Like with `"o"`
|
|
||||||
event, it's UTF-8 encoded JSON string, with all non-printable Unicode codepoints
|
|
||||||
encoded as `\uXXXX`.
|
|
||||||
|
|
||||||
> Official asciinema recorder doesn't capture stdin by default. All
|
|
||||||
> implementations of asciicast-compatible terminal recorder should not capture
|
> implementations of asciicast-compatible terminal recorder should not capture
|
||||||
> it either unless explicitly permitted by the user.
|
> it either unless explicitly permitted by the user.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user