When running in node.js, pressing arrow keys (or any other control-sequence characters) prints them out, instead of them doing their intended job (eg, up for previous input). This seems to be because in non-raw mode, we only get given data from stdin when <return> is pressed.
I experimented with enabling raw mode, and readline.js does now recognise when the arrow keys are pressed, but this also breaks command input, which is less than ideal. :sweat_smile:
In any case, here's as far as I got, having Ctrl-C work.
When running in node.js, pressing arrow keys (or any other control-sequence characters) prints them out, instead of them doing their intended job (eg, up for previous input). This seems to be because in non-raw mode, we only get given data from stdin when
<return>
is pressed.I experimented with enabling raw mode, and readline.js does now recognise when the arrow keys are pressed, but this also breaks command input, which is less than ideal. :sweat_smile:
In any case, here's as far as I got, having Ctrl-C work.