aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorPaul Oliver <contact@pauloliver.dev>2024-02-29 02:29:14 +0100
committerPaul Oliver <contact@pauloliver.dev>2024-02-29 02:29:14 +0100
commit2e7a2d94e73ece0a37b1d9d3162d4f91aeaf57dc (patch)
tree538e9b33aaadca8e41d1320255cb52de624dad40 /bin
parent6d8540503e60ee18b22dce58935fec329afa8f2c (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.
Diffstat (limited to 'bin')
-rw-r--r--bin/printer.py4
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: