Skip to content

vhs record generates invalid tapes when used PageUp/Down is repeatedly pressed #559

Open
@PatrickHechler

Description

@PatrickHechler

Describe the bug
when vhs record is used and PageUp (or PageDown) is pressed multiple times (fast) the output contains a line like: Pageup 10/Pagedown 10.
this line is not considered valid by vhs:

File: vhs-file.tape
  2 │ Pageup 10
      ^^^^^^ Invalid command: Pageup

  2 │ Pageup 10
             ^^ Invalid command: 10

parser: 2 error(s)
recording failed

Setup
Please complete the following information along with version numbers, if applicable.

  • OS Arch
  • Shell zsh
  • Terminal Emulator vhs, kitty

To Reproduce
Steps to reproduce the behavior in normal terminal:

  1. start vhs record > testfile.tape
  2. Hold the PageDown or PageUp key for some time
  3. finish the record (i.e. use the exit command)
  4. start vhs testfile.tape
  5. See error

Steps to reproduce the behavior in vhs terminal:

  1. start vhs testfile.tape
    • see the Source Code section
    • this basically just does steps 1..3
  2. start vhs invalid-file.tape
  3. See error

Source Code
If needed the error can be reproduced using the vhs terminal.
vhs file.tape will be successfull, but the generated invalid-file.tape is invalid.

Set Shell zsh
Type "vhs record > invalid-file.tape"
Enter
PageUp 10
Ctrl+C
Type "exit"
Enter
Type "exit"
Enter

Expected behavior
vhs record generates valid output (the output is accepted by vhs if given as .tape file).
for example vhs record could generate PageUp and PageDown commands instead of Pageup/Pagedown.

Screenshots
Add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions