Re: backspace and del keys
# [EMAIL PROTECTED] / 2002-10-25 18:41:43 -0700: Oh well. I've learned to live in ignorance when it comes to keys and fonts (among other things). Yeah, I've had to, too. Terrible feeling, but this area is just too much into voodoo^Wundocumented nightmare. -- If you cc me or take the list(s) out completely I'll most likely ignore your message. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message
Re: backspace and del keys
On 2002-10-24 16:02, Michael Morris [EMAIL PROTECTED] wrote: Thanks for the quick response. Both of the keys on the keyboard marked Delete, above the cursor movement keys and in the numeric keypad appear to do the same thing. I have tried this inthe virtual console tty, XTerm, Konsole, and ETerm and they pretty much behave the same. 1. What is your TERM environment variable set to in each case? 2. What does the following command print? % stty -a Giorgos. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message
Re: backspace and del keys
1. What is your TERM environment variable set to in each case? There are various $TERM values used. In the virtual console it is cons25, in the X based terminal emulators I have tries xter, xterm-color, and linux. All behave in similar manners. 2. What does the following command print? % stty -a speed 38400 baud; 24 rows; 80 columns; lflags: icanon isig iexten echo echoe echok echoke -echonl echoctl -echoprt -altwerase -noflsh -tostop -flusho pendin -nokerninfo -extproc iflags: -istrip icrnl -inlcr -igncr ixon -ixoff ixany imaxbel -ignbrk brkint -inpck -ignpar -parmrk oflags: opost onlcr -ocrnl -oxtabs -onocr -onlret cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow -dtrflow -mdmbuf cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = undef; eol2 = undef; erase = ^H; erase2 = ^@; intr = ^C; kill = ^U; lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W; This is using an X terminal emulator. When in a virtual console erase2 is ^H, the same as erase. Michael. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message
Re: backspace and del keys
On 2002-10-25 08:00, Michael Morris [EMAIL PROTECTED] wrote: 1. What is your TERM environment variable set to in each case? There are various $TERM values used. In the virtual console it is cons25, in the X based terminal emulators I have tries xter, xterm-color, and linux. All behave in similar manners. Good. I was looking for something strange in $TERM usage. 2. What does the following command print? % stty -a eol2 = undef; erase = ^H; erase2 = ^@; intr = ^C; kill = ^U; erase seems to be set to ^H. When you run cat(1) and press DEL what does your terminal show? My cons25 terminal shows: keramida@hades[19:34]/home/keramida$ cat ^? Are you resetting any of erase or erase2 in your shell startup files with stty? Giorgos. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message
Re: backspace and del keys
On 2002-10-25 09:48, Michael Morris [EMAIL PROTECTED] wrote: erase seems to be set to ^H. When you run cat(1) and press DEL what does your terminal show? My cons25 terminal shows: keramida@hades[19:34]/home/keramida$ cat ^? Mine shows ^[[3~ That's an xterm, I suppose. Looks fine, in that case. Are you resetting any of erase or erase2 in your shell startup files with stty? There is a statement in the /etc/bashrc file: stty erase `tput kbs` Hmmm. Why? Try commenting out that .bashrc part. What is `kbs' supposed to be anyway? The termcap(5) manpage doesn't mention a kbs capability. Giorgos. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message
Re: backspace and del keys
Michael Morris [EMAIL PROTECTED] writes: When I run tput kbs, nothing is displayed. When I run echo 123$(tput kbs)456 I get 12456 apparently because tput kbs puts out some kind of backspace to the shell. I suspect that you need to read your shell's discussions of command line processing. Run bind (a shell built-in) and grep it's output for del and back. You should ensure that you've got your shell using Emacs-style line editing. Better yet, use the Control-D key for delete (the Emacs-style default) and redefine the Delete keys for things you need less often. :-) Note that the key interpretation can be changed in an application (eg, your shell), xterm X resources, termcap (?), your window manager config, and in the X key config (in increasing precedence, I hope). To take full advantage of your Internet/multimedia keyboard, you might want to look into: /usr/X11R6/lib/X11/xkb/ /usr/X11R6/man/man1/*xkb* http://www.tsu.ru/~pascal/en/xkb/ Poor English, but sometimes better than official docs. http://www.charvolant.org/~doug/xkb/ An Unreliable Guide to XKB Configuration To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message
Re: backspace and del keys
Figured it out for xterms. Readline(3) uses an initialization file .inputrc to customize commands. There was no inputrc file in the system si I added one in etc and set INPUTRC=/etc/inputrc in the /etc/bashrc file. I actually took the file from my Linux system but is has the following line. \e[3~: delete-char This works fine in X but does not change the virtual consoles. That is not a problem because I rarely use them. The best thing about it is that I have learned quite a bit during this little exercise. You assistance is greatly appreciated. On Fri, 2002-10-25 at 15:18, Gary W. Swearingen wrote: Michael Morris [EMAIL PROTECTED] writes: When I run tput kbs, nothing is displayed. When I run echo 123$(tput kbs)456 I get 12456 apparently because tput kbs puts out some kind of backspace to the shell. Yes, tput kbs returns the Backspace key for that terminal definition in termcap. I suspect that you need to read your shell's discussions of command line processing. Run bind (a shell built-in) and grep it's output for del and back. You should ensure that you've got your shell using Emacs-style line editing. Better yet, use the Control-D key for delete (the Emacs-style default) and redefine the Delete keys for things you need less often. :-) Note that the key interpretation can be changed in an application (eg, your shell), xterm X resources, termcap (?), your window manager config, and in the X key config (in increasing precedence, I hope). I will work with bind and learn more about it. It will come in handy later. To take full advantage of your Internet/multimedia keyboard, you might want to look into: /usr/X11R6/lib/X11/xkb/ /usr/X11R6/man/man1/*xkb* http://www.tsu.ru/~pascal/en/xkb/ Poor English, but sometimes better than official docs. http://www.charvolant.org/~doug/xkb/ An Unreliable Guide to XKB Configuration Cool, thanks. I ran across some of those last night and made a note to revisit it later. Could be another useful bit of knowledge. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message
Re: backspace and del keys
On 2002-10-25 15:20, Michael Morris [EMAIL PROTECTED] wrote: On Fri, 2002-10-25 at 15:18, Gary W. Swearingen wrote: Michael Morris [EMAIL PROTECTED] writes: When I run tput kbs, nothing is displayed. When I run echo 123$(tput kbs)456 I get 12456 apparently because tput kbs puts out some kind of backspace to the shell. Yes, tput kbs returns the Backspace key for that terminal definition in termcap. Apparently not. In my screen(1) window, I can see with stty -a that erase is set to ^H. My backspace key sends ^H and works fine as a ``backspace''. The delete key sends ^[[3~. The tput commands only prints an ASCII 127 (DEL) character: keramida@hades[02:07]/home/keramida$ tput kbs | hd 7f|.| 0001 I'm not sure if that's correct, or a bug. But it certainly won't match your backspace key. At worst, it will match your keyboard's DEL key, and will create the impression that backspace and DEL keys work backwards. Giorgos. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message
Re: backspace and del keys
Giorgos Keramidas [EMAIL PROTECTED] writes: keramida@hades[02:07]/home/keramida$ tput kbs | hd 7f|.| 0001 I'm not sure if that's correct, or a bug. But it certainly won't match your backspace key. At worst, it will match your keyboard's DEL key, and will create the impression that backspace and DEL keys work backwards. Good use of hd. I get 08 (BS) instead of 7f. And tput kdel gives 1b 4f 42. As long as the two give different codes, his shell can translate them as he likes, and he needn't fix lower-level key config. Of course, it doesn't change things for other apps. I found kbs in /usr/X11R6/lib/X11/etc/xterm.terminfo, but it doesn't have kdel, so I doubt if that's the source of even kbs. Oh well. I've learned to live in ignorance when it comes to keys and fonts (among other things). To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message
Re: backspace and del keys
Michael Morris [EMAIL PROTECTED] writes: : The question/problem I am facing now is a keyboard issue. The delete : key is interpreted the same a the backspace key. Can that be changed : and where would I look for the info needed to change it? What delete key? What are you trying to when you discover the apparent 'equality' of backspace and del? Are you in a virtual console tty? In X11? Are you running any programs at the time? What programs? Giorgos. PS: I have moved the thread in freebsd-questions. The -newbies list is not for asking general questions. Please keep it here. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message
Re: backspace and del keys
On Thu, Oct 24, 2002 at 04:02:05PM -0700, Michael Morris wrote: Thanks for the quick response. Both of the keys on the keyboard marked Delete, above the cursor movement keys and in the numeric keypad appear to do the same thing. I have tried this inthe virtual console tty, XTerm, Konsole, and ETerm and they pretty much behave the same. This was done at the command line in sh, csh, and bash. It was also tried in vim and Some GUI apps like Evolution. At the virtual console tty pressing the Delete key deletes the character to the left of the cursor rather than the one below it. In XTer and ETerm is insets a tilde character. To get XTerm to generate a DEL when you hit the Delete key, you need to add the following line into ~/.Xdefaults: xterm*deleteIsDEL: true -- Jonathan Chen [EMAIL PROTECTED] -- Do not take life too seriously. You will never get out of it alive. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message
Re: backspace and del keys
On Thu, 2002-10-24 at 20:58, Jonathan Chen wrote: To get XTerm to generate a DEL when you hit the Delete key, you need to add the following line into ~/.Xdefaults: xterm*deleteIsDEL: true Nothing changed with this line in the file. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-questions in the body of the message