-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
process.stdin
keypress event returns ctrl: false
in a [control + [backspace]
event
#2890
Comments
process.stdin
keypress event omits ctrl: true
in a [control + [backspace]
eventprocess.stdin
keypress event returns ctrl: false
in a [control + [backspace]
event
Afaik, you'll need to put the readline into terminal mode for this? https://github.com/nodejs/node/blob/master/lib/readline.js#L124 I don't think process.stdin itself does this. Weirdly enough, Readline emits events on it's input stream. |
Ah. Got it. Tried terminal mode as such, to the same result: var i = rl.createInterface({
input: process.stdin,
output: process.stdout,
terminal: true
}); It's literally the Any ideas? |
Looks like the https://github.com/nodejs/node/blob/master/lib/readline.js#L984 |
Looks like control isn't computed for backspace
It looks like the key modifier methods are just not checked for the backspace character, only the main keys (starting with Any idea why? |
@Fishrock123 the terminal option is defaulting to the |
ping @Fishrock123 ... |
Meh. I'll do more research on it, and if I can get a better reproduction I'll file a more complete bug. |
The bug is still there and I meet it today. When I use conhost or git bash or powershell(on Windows Terminal), the problem arises. But in VScode integrated terminal, this problem only appear when I use command prompt(conhost) and it doesn't occur when I use bash or powershell. |
When logging a keypress event, the
[control]
key generally provides a{ ... ctrl: true }
in the return keypress data returned on the event. However, peculiarly, when[control + [backspace]
event is fired,ctrl
is returned as false.Steps to reproduce:
This was verified to be a situation in
v4.0.0
.The text was updated successfully, but these errors were encountered: