Skip to content

Unable to send control characters? #5

@maholli

Description

@maholli

It'd be very helpful to be able to send control characters (CTRL+C, BACKSPACE, etc...).

I couldn't readily find a way to send raw bytes via the input box.

EDIT: (for those also wondering)
Undoubtedly my naiveness, but since I couldn't escape bytes within the input box, I just added a couple buttons for control characters I commonly use with CircuitPython boards.

add buttons:

<button onclick="sendCtrlChar(3)" style="width:45px">Halt</button>
<button onclick="sendCtrlChar(4)" style="width:65px">Restart</button>

add function

async function sendCtrlChar(ctrlChar) {
    if (ctrlChar == 3) dataToSend = "\x03"; //ctrl+C
    if (ctrlChar == 4) dataToSend = "\x04"; //ctrl+D
    await writer.write(dataToSend);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions