Skip to content

Backspace behaves confusingly with PuTTY #27

Description

@tari

Using PuTTY to talk to a device running embedded-cli over USB, PuTTY's default settings cause confusing errors when backspace is used to edit the command line:

$ selftest backplane -d 20
$ selftest backplane -h
error: failed to parseh', expected u32

To type the second line, I pressed up and backspaced away the -d 20, then typed -h. That the error message is malformed allows us to see the issue better, where it can also lead to situations like this one, which is more confusing:

$ selftest backplane -d 20
error: failed to parse '20', expected u32

What's actually happening is that PuTTY defaults to sending a byte with value 127 for backspace, whereas embedded-cli seems to expect only ASCII backspace (byte value 8). When echoed back, commands still contain backspaces that the terminal understands so it's not clear that the application is treating backspaces as further input.


It would be nice if embedded-cli also treated 127 as a backspace character, so PuTTY's default configuration works as expected. It does work to change PuTTY's option to send 8 for backspace instead, but it's a little more annoying to use non-default settings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions