Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

ESP32: Ctrl-F special key breaks existing code #137

Closed
@robert-hh

Description

@robert-hh

It's a breaking change and interferes with code, that expects a transparent interface from USB. That code would typically use micropython.kbd_intr(-1) to set the UART/Telnet to a transparent mode, as documented. Maybe we could agree in that key_intr(-1) disables both special interrupt characters. That would however require to change pyexec.c in addtion to machuart.c and telnet.c, because in pyexec the interrupt_char is already set to -1. But since the value of -1 in pyexec is an arbitrary internal one, and kbd_intr(-1) was already given as example in the documentation, it's better to change pyexec.c

Edit: Alternatively, kbd_intr() could get a second optional parameter to set the hard reset key, which is now Ctrl-F:
kbd_intr(-1) sets both interrupt_char and reset_char to -1
kbd_intr(interrupt_char) would just set interrupt_char to the given value
kbd_intr(interrupt_char, reset_char) sets both values.

Edit 2: For trial, I implemented both versions. The second alternative changes 6 files, but in a rather trivial way.

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