asciinema-player icon indicating copy to clipboard operation
asciinema-player copied to clipboard

Key-press overlay

Open ku1ik opened this issue 8 years ago • 10 comments

New asciicast v2 format has a place for keypresses (https://github.com/asciinema/asciinema/blob/fb1e25d933851743f4aed744279ab5361af9ad4b/doc/asciicast-v2.md#i---data-read-from-stdin) and asciinema 2.0 allows recording stdin (https://github.com/asciinema/asciinema/tree/fb1e25d933851743f4aed744279ab5361af9ad4b#rec-filename).

The web player could now use recorded stdin events to display these keystrokes in an overlay.

ku1ik avatar Nov 26 '17 00:11 ku1ik

any update on this?

shibumi avatar Aug 20 '18 18:08 shibumi

+1

ruslanosipov avatar Nov 10 '18 22:11 ruslanosipov

+1

sametcodes avatar Jul 30 '19 15:07 sametcodes

I need this to record sessions where I use both zsh & vim so I want the keys to be displayed only when in vim. I guess I'll have to code it myself, but before I do, I want to make sure I got the design right:

IMHO, there are three components we need:

  1. Add support for the <track> sub element to display key presses, captions, etc.
  2. A new utility to convert a recording's stdin to the WebVTT format supported by <track>.
  3. in asciinema.org, add the option to upload a WebVTT file when editing a recording

At first we'll support just a single text track, in the future we can support multiples track without changing the interface.

daonb avatar Sep 13 '19 06:09 daonb

I've started working with creating the subtitle file and it doesn't look good. Grouping keys together results in captions like "Ihello" (vim). Problem is this caption will be displayed the second I type I and it's too confusing. The keys should be displayed as I type them and that's why I :-1: my idea above.

daonb avatar Sep 18 '19 14:09 daonb

Any update on this ?

rlanore avatar Apr 30 '20 12:04 rlanore

Any update on this ?

bonnefoi avatar May 29 '20 14:05 bonnefoi

Any update on this?

Kreijstal avatar Jan 21 '22 09:01 Kreijstal

I'm very interested in any updates on this.

I think this needs higher priority.

How else to show new users pro tricks like typing SHIFT+(!,$), CTRL+([,E) to insert the last argument from the previous line using readline? Or the way to use proper tab completion?

Ideally, it should be possible in the player to 'step' through each keypress one by one when playing, with only short segments of animation when terminal state changes between keypresses.

This would make it far more useful for what I'd consider asciicinema's 'killer app': Documentation that can show people exactly how to do things, as if they're watching over your shoulder and can see every keypress.

Being able to step the replay means they can watch and possibly follow along the sequence at their own pace, which would make it far less confusing / intimidating.

But they can also watch it at 'full speed', which demonstrates how much time is saved by 'doing it right'.

Else asciicinema replays are more just showing off, and learners will just think 'wow that looks hard, I'll never be able to learn that'. Wheras what you want them to come away with is 'wow, that's so fast and easy, how come no-one ever showed me this before?'.

RGD2 avatar Jan 25 '22 01:01 RGD2

Subscribed for years...Modifier keys may can not captured under command line. Maybe subtitles or https://en.wikipedia.org/wiki/Danmu ?

district10 avatar Jan 25 '22 01:01 district10