tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: wsvt25 backspace key should match terminfo definition
> The real issue is quite simple -- users want to be able to use the
> easily reachable key that should delete the previously typed
> character to actually delete the previously typed character.
Yes...though, in many cases, that can involve negotiation with other
pieces of software - anything using cbreak mode and doing its own line
editing, such as a curses interface to something like IRC or ICB, might
be an example.
Your description below includes a number of unmarked assumptions, which
may or may not be true.
> Today in NetBSD we can also easily modify what the pressed key sends.
> (E.g. with wsconsctl(8) or with xmodmap(1), depending on one's
> environ)
Assumption: the "terminal" in use consists of a keyboard and video
display directly attached to the computer (as opposed to, say, a real
serial terminal on a real serial port).
> 3. type the key you want to use to erase character by character
> 4. a) If it returns you to your shell prompt, continue to step 5a.
> b) If it erases the most previous character each time you press
> it, you're done -- press the return key, then <Control-D>.
Assumption: c_cc[VEOF] is 4. This is not always true, especially in a
document that's all about changing (other) elements of c_cc[]. (As
someone who went through larval phase under VMS and even now runs with
stty eof ^Z susp ^P kill ^X, I am particularly aware of VEOF
assumptions.)
> c) If two characters are echoed every time you press that key, for
> example "^H", then press the return key followed by <Control-D>,
^D assumption again (and, below, I'm not going to mention repetitions
of assumptions I've already called out), but also the assumption that
ECHOCTL is set.
> stty erase ^H
Depending on the shell, and sometimes the shell's settings, ^ may be a
shell metacharacter, leading to this not working.
> Put a copy of this line in your ~/.profile followed by "tset -r"
Assumption: the user is using a Bourne-derived shell (ie, one that
reads .profile, as opposed to, say, .cshrc). (And why would you assume
the user wants tset -r output blabbed as login noise?)
> (You may, or may not, also want to change your interrupt key to
> DEL with a command like "stty intr ^?".)
More shell metacharacter assumptions, only even more likely to fail,
because ? is much more commonly a metacharacter than ^. Some shells
will still generate "^?" in the arglist, but some won't. In some cases
it will depend on what files are present in some relevant directory.
> stty intr ^C erase ^?
...assuming the user is willing to live with VINTR being ^C.
> The Unix (or "UNIX") tradition is for "stty kill" to be 'DEL' (and
> erase to be either 'BS' or '#', depending on how far back you go).
If you go back far enough for (what I'm now, loosely, calling) VERASE
to be #, then I think the corresponding VKILL character is @, is it
not? (And, for that setting suite, I think DEL would be VINTR.)
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse%rodents-montreal.org@localhost
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
Home |
Main Index |
Thread Index |
Old Index