From 2e7a2d94e73ece0a37b1d9d3162d4f91aeaf57dc Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Thu, 29 Feb 2024 02:29:14 +0100 Subject: 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. --- bin/printer.py | 4 ++++ 1 file changed, 4 insertions(+) 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: -- cgit v1.2.1