Inquirer.js
Inquirer.js copied to clipboard
Is it possible to handle modifier keys (shift or ctrl) with enter when choosing from a choices list?
I have a prompt with a list of choices, user selects a given choice with arrows and presses Enter
, works fine. But now I'd like to add "Help mode": when user selects a given choice and presses Ctrl
+Enter
- a help page for this particular choice opens instead of default action. I've looked at https://github.com/SBoudrias/Inquirer.js/issues/949 , which would let me handle keys in addition to arrows and enter, but, as described in that issue, proposed solution does not work for me after first choice. Can you please advice, what would be a good way to do something like this?
P.S. Thank you for great library!
Update yet another issue asking for the same https://github.com/SBoudrias/Inquirer.js/issues/933