-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
SIGINT hardcoded to Ctrl+C? #3328
Comments
Node.js puts the tty into raw mode (think |
FYI, this logic seems to be at https://github.com/nodejs/node/blob/master/lib/readline.js#L688. All of these are hardcoded. Could those either be read from |
@atsepkov That only counts if you have readline (i.e. the REPL) open. I'm not sure where the logic is, but @bnoordhuis answer is likely correct for interrupting non-readline programs. I don't see much point in changing one if we don't change both. Edit: actually I don't think changing the readline one is really possible since it doesn't pick up your terminal's config. |
It wasn't very clear the original post was about the REPL. Yes, the REPL has ^C hard-coded. No, I don't think it's very worthwhile to detect alternative mappings. Lots of complexity for an infinitesimally small fraction of the user base. |
Could I at least have the option to configure them without editing the source? This is a bug (it's a hardcoded setting that happens to hold 95+% of the time), even if the affected user base is small. Also, calling it infinitesimally small is falling victim to availability bias. Google "ctrl+c remapping terminal", "stty remapping", etc. and you'll see plenty of examples of users talking about it. |
Moving to #4758 since the new issue is more clear. |
bah this issue is about hard-coding, sorry, that's something else. I'm going to close since there isn't action though. Configuring your terminal will not necessarily configure programs you run! :) |
I've had to remap my SIGINT to a different key via
stty
:Now
^K
performs interrupts correctly in all GNU apps I tried.node
, however, ignores^K
sequence, it still responds to^C
, which no longer should send SIGINT.The text was updated successfully, but these errors were encountered: