diff --git a/zmk/terminal.py b/zmk/terminal.py index 06cd015..fc58cb9 100644 --- a/zmk/terminal.py +++ b/zmk/terminal.py @@ -158,7 +158,12 @@ def read_key() -> bytes: Special keys such as arrow keys return xterm or vt escape sequences. """ with disable_echo(): - return os.read(sys.stdin.fileno(), 4) + key = os.read(sys.stdin.fileno(), 4) + + if key == b"\x7f": # Bash uses DELETE instead of BACKSPACE + return BACKSPACE + + return key def get_cursor_pos() -> tuple[int, int]: