diff options
author | Paul Oliver <contact@pauloliver.dev> | 2024-02-29 02:29:14 +0100 |
---|---|---|
committer | Paul Oliver <contact@pauloliver.dev> | 2024-02-29 02:29:14 +0100 |
commit | 2e7a2d94e73ece0a37b1d9d3162d4f91aeaf57dc (patch) | |
tree | 538e9b33aaadca8e41d1320255cb52de624dad40 | |
parent | 6d8540503e60ee18b22dce58935fec329afa8f2c (diff) |
Added generic code for back-space key.
[#14] This new code makes back-space work correctly through SSH. It
still needs to be tested in Cygwin.
-rw-r--r-- | bin/printer.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/printer.py b/bin/printer.py index 1e3be8f..c7735f2 100644 --- a/bin/printer.py +++ b/bin/printer.py @@ -310,6 +310,10 @@ class Printer: if cmd in [curses.KEY_RESIZE, self.ESCAPE_KEY]: console.clear() return EXIT + # Provide general code for back-space key, in case it's not + # correctly defined. + elif cmd in [127, curses.KEY_BACKSPACE]: + return curses.KEY_BACKSPACE elif cmd == curses.KEY_UP: access_history("up") elif cmd == curses.KEY_DOWN: |