question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using Blessed with Vorpal causes two characters input instead of one

See original GitHub issue

Using Blessed in conjunction with Vorpal like this:

const blessed = require('blessed')
const vorpal  = require('vorpal')()

const program = blessed.program() // Commenting this out means normal behaviour

vorpal
  .command('test')
  .action(function (args, cb) {
    this.log('Good luck getting to this command!')
    cb()
  })

vorpal
  .delimiter('> ')
  .show()

Causes output like this:

➔ node minimal.js
> tteesstt

  Invalid Command. Showing Help:

  Commands:

    help [command...]  Provides help for a given command.
    exit               Exits application.
    test

>
>

As you can probably tell, every keystroke is sent / read twice, even the “return” key.
My guess is that Blessed attaches their own listener, and emits the event as well? Just a guess, though.

Maybe someone with knowledge of Blessed can help me out?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
jeffhuyscommented, Aug 10, 2017

@milesj yes, I want to create a REPL where I create dashboards. So, first I use Vorpal to allow for commands to be parsed. When a user types “create dashboard” or “show dashboard dash1”, it hands the terminal over to Blessed, where it can do its thing (show a dynamic dashboard), and when q is pressed, it hands the terminal back to Vorpal, where other commands can be supplied.

0reactions
amir-aradcommented, Feb 3, 2018

i would like that very very much as well

Read more comments on GitHub >

github_iconTop Results From Across the Web

Mysterious - We're developing a Vorpal Umbrella and would ...
We're developing a Vorpal Umbrella and would love your feedback. Current design features alchemy print pattern interior, a skull handle, and push-button...
Read more >
starting monk vorpal blade - Google Groups
Just started with monk, got vorpal blade from sacrifice at orcish mines. Is it good ? How far can I enhance swords ?...
Read more >
Under Night In-Birth Late[st] • Beginner's Guide - YouTube
Explaining Every Vorpal / Character Trait | Under Night In -Birth Late[st] ... An error occurred while retrieving sharing information.
Read more >
Under Night In-Birth/UNICLR/Phonon - Mizuumi Wiki - GBL.gg
Having a strong sense of power, Phonon leaves the EFG, a student self-defense force known for their strict rules, so she can use...
Read more >
Jabberwocky - Wikiwand
And burbled as it came! One, two! One, two! And through and through. The vorpal blade went snicker-snack! He left it dead, and ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found