Teraterm + pigfx terminal don't handle backspace

431 views
Skip to first unread message

Patrick Jackson

unread,
Apr 25, 2021, 9:02:34 AM4/25/21
to RC2014-Z80
I've been using a mix of Putty (for programming/messing around) and Teraterm (for file send/receive) on my romwbw system for a while now. Just recently, I got pigfx working and I'm planning on that being my daily driver.

However, I notice a quirk about how both Teraterm and Pigfx handle the backspace. Instead of deleting the previous character, it just moves the cursor backward one space.

What's the proper sequence that I need to send to get the backspace effect?

Douglas Miller

unread,
Apr 25, 2021, 10:17:46 AM4/25/21
to RC2014-Z80
For a terminal, and I suspect terminal emulators, backspace should be "non-destructive" - same as "move cursor left". It is the OS or host application that erases the character on the screen - typically by echoing "BS SP BS" when it receives a BS. I seem to recall some terminals that had the option, or perhaps always did, a destructive backspace. But that was generally frowned upon and used in special cases like offline screen editing or certain hosts that couldn't handle it better. (BS=backspace, SP=space)

Keep in mind, the keyboard is separate/isolated from the screen. You press BS on the keyboard and that sends 0x08 to the host. Nothing is done to the screen until the host sends characters back. If the host naively echoes only the BS then the terminal will just move the cursor left. But again, the display should never change just from pressing keys (at least when "online"). It is up to the host to respond to keystrokes and alter the display as it wishes.


Patrick Jackson

unread,
Apr 25, 2021, 1:51:29 PM4/25/21
to RC2014-Z80
Ah, so basically, the cursor moves to the left one space, but it DOES remove the character from the buffer, just not the screen?

Douglas Miller

unread,
Apr 25, 2021, 1:54:47 PM4/25/21
to RC2014-Z80
That depends on the code running on the host. Presumably, the character is removed from the buffer. But if the host is not handling BS then it just echoed the BS and left it in the buffer. What is running on the host?

Patrick Jackson

unread,
Apr 25, 2021, 2:23:52 PM4/25/21
to RC2014-Z80
Its usually either ZDE or the TE text editors. Backspace in the cp/m shell seems to work normally

Douglas Miller

unread,
Apr 25, 2021, 5:02:32 PM4/25/21
to RC2014-Z80
OK, so that appears to be the way those editors work. They may or may not be treating BS as destructive - it may be the "move left" action. You'd have to run an experiment and see whether BS was destructive or not after saving the file. One would normally expect BS to be destructive, but the program gets to choose. It might even be an option that can be configured/enabled.

Patrick Jackson

unread,
Apr 26, 2021, 9:15:53 PM4/26/21
to RC2014-Z80
Interesting. On Putty, both editors treat the backspace as destructive, but on teraterm and pigfx terminal, the backspace is not desctructive in ZDE.COM.
I'm planning on using pigfx in the long term, so it looks like the terminal itself handles backspace differently. I'll have to investigate what it does to the keypress differently

Clark Martin

unread,
Apr 26, 2021, 10:28:32 PM4/26/21
to rc201...@googlegroups.com
It may be an issue of what the terminal or terminal emulator sends when you hit the "backspace" key, an ASCII BS (0x08) or ASCII DEL (0x7F).  

sigbu...@gmail.com

unread,
Feb 18, 2022, 12:43:48 PM2/18/22
to RC2014-Z80
Did you ever find a fix for this? I have PiGFX working fine now except that in ZDE I can't delete anything unlike when using Putty from my machine. The newer versions of PiGFX have some config options I am going to play with but curious if you found a good combination.

backspaceEcho = 0           ; Auto-echo the backspace char
skipBackspaceEcho = 0       ; Skip the next incoming character after a backspace from keyboard
swapDelWithBackspace = 1    ; Substitute DEL (0x7F) with BACKSPACE (0x08)
Reply all
Reply to author
Forward
0 new messages