Version 14 of The Backspace problem

Updated 2004-08-13 03:12:50 by amg

Robert Abitbol This is a real drag as we used to say in the seventies.:) With a TCL program I use the backspace key and instead of going backwards, the function stays still and I get the impression that letters are falling in a sort of hole.

How could I fix the problem?

Thanks once more teclers!


Instead of creating a new page, how about asking questions here: Ask, and it shall be given # 2

Robert Abitbol Good point! I did hesitate between writing my question in Ask, and it shall be given # 2 or in a separate page. I opted for a separate page because this way, anyone who has a similar problem can enter the word backspace on the search for titles and he/she will get his/her answer to the problem right away instead of having the answer buried in a huge Ask, and it shall be given # 2 page. It's just a matter of being more efficient, more functional.


FW: To me it sounds like you're saying the insertion cursor stays at the same place in the line when you backspace. This doesn't happen for me, so it may be specific to the program you're using (perhaps alters the bindings?) If you try a simple text widget pack text .t does it still happen?

LES: My guess is that text in his widget (an entry widget, I suppose) is aligned "center". So the text gets shorter on the "edges" and it looks like the cursor (the editing point) does not ever move.

Robert Abitbol Thanks gentlemen for your answers. You are both right: the backspace feels like it is centered and it stays in the same location, in the same column. I'll try to put the code you suggest FW. Where do I enter it (excuse my ignorance :-))

If I put the text widget you suggest, will it also solve the problem of the home function that returns to the beginning of the paragraph instead of going to the beginning of the line?

Thanks again for your answers.


AMG: This is a different sort of backspace problem, but I encounter it frequently enough. Most likely I'm not the only one with such badly misconfigured machines as to experience it, so I imagine others may come to this page looking for a solution. In tclsh sometimes backspace just writes a ^H. Fix? I type stty erase ^H. And I generate that ^H by hitting my backspace key rather than typing ^ followed by H.

This isn't tclsh-specific, of course. tclsh is just one of many, many programs that don't use readline but rather depend on the terminal to do all line editing and buffering. So all we do is reconfigure the terminal via stty.


Category Tutorial