dthree / dthree/vorpal

Using Blessed with Vorpal causes two characters input instead of one

Open
#278 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5.6k
Forks
278
PR merge metrics
No merged PRs in 30d

Description

Using [Blessed](https://github.com/chjj/blessed) in conjunction with Vorpal like this:

```javascript
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:

```bash
➔ 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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.