NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: That DEL key thing...
Hi again, sorry for late response but I was yesterday dismantling my EeePC netbook which is part of the subject.
Michael van Elst <mlelstv%serpens.de@localhost> wrote:
> On a PS/2 keyboard:
> The "Backarrow" key generates a scancode 14, mapped to symbol "Delete"
> The "Delete" key generates a scancode 211, mapped to symbol "Delete"
>
> On a USB keyboard:
> The "Backarrow" key generates a usage code 42, mapped to symbol "Backspace".
> The "Delete" key generates a usage code 76, mapped to symbol "Delete".
>
> The console generates a "^H" for "Backspace" and a "^?" for "Delete".
>
> There is no PS/2 key that would generate "Backspace", you can enter
> a "^H" with "Ctrl"+"H".
>
> [...]
>
> The currently most common (but not the original) behaviour is
> to make the "Backarrow" key generate "^H" and use that for the
> erase operation, and since that is handled by the defaults almost
> everywhere, I'm changing only the keyboard map if I have a PS/2
> keyboard.
>
> In /etc/rc.conf I set wscons=YES to enable the wsconsole. You
> probably have that as default.
>
> In /etc/wscons.conf I have added the following line:
>
> setvar wskbd map+ \"keycode\ 14\ =\ Cmd_ResetEmul\ BackSpace\ Delete\"
>
> This makes the "Backarrow" key (code 14) generate a "^H" on the
> console and "Shift" + "Backarrow" generates a "^?".
so my built-in keyboard is a PS/2 one, it seems.
I added that line to wscons.conf (and yes, wscons is enabled by default there), now backspa^W backarrow generates "^H", DEL "^?". However both still erase to the left
Bob Proulx <bob%proulx.com@localhost> wrote:
> I would want to see the output of "stty -a" and see what the erase
> settings are set to in the tty driver.
pl@toasterbawx:/home/pl~$ stty -a
speed 9600 baud; 37 rows; 128 columns; queue = 1024; line = termios;
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 -mdmbuf
-cdtrcts
cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>;
eol2 = <undef>; erase = ^?; intr = ^C; kill = ^U; lnext = ^V;
min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T;
stop = ^S; susp = ^Z; time = 0; werase = ^W;
*It's after I added previously mentioned line to wscons.conf
> DEL has never removed characters to the right in my experience.
> However the Keypad Delete to the right is usually configured that way.
I come from Windows, Linux background where BS removed from left and DEL erased to the right. FreeBSD behaves similiarly - Well, it also works that way on X11 on NetBSD. Meanwhile on wscons both remove to the left
My EeePC lacks keypad. External USB keyboard generates "^[[3~" on keypad DEL which seems to have no effect in wscons (writes a tilde), in X11 it's same as the DEL key.
--
pl <pl%szwajn.net@localhost>
Home |
Main Index |
Thread Index |
Old Index