Hello. I often worked on OpenBSD AMD/Intel PC consoles and really did not have good support of navigation and function keys of a typical PC keyboard. Also I had some problems with colors/attributes (maybe they were video adapter dependent).
These issues exist long time and cause much inconveniences if you often work at console. I think that the default "vt220" is not well suited for an AMD/Intel consoles (my typical work environment consists of mail and Midnight Commander). I looked at OpenBSD terminal descriptions database and found descriptions for NetBSD, FreeBSD, linux, etc consoles but nothing suitable for OpenBSD AMD/Intel consoles!.. I prepared and tested several terminal description for AMD/Intel consoles. Here is the patch against OpenBSD-CURRENT sources: --- ./share/termtypes/termtypes.master.orig Wed Jul 6 22:49:08 2011 +++ ./share/termtypes/termtypes.master Thu Sep 1 19:24:57 2011 @@ -1651,6 +1651,55 @@ qansi-w|QNX ansi for windows, xvpa, use=qansi-m, +#### OpenBSD consoles +# +# From: Alexei Malinin <alexei.mali...@mail.ru>; July, 2011. +# +# The following terminal descriptions for the AMD/Intel PC console +# were prepared based on information contained in the OpenBSD-4.9 +# termtypes.master and wscons(4) & vga(4) manuals (2010, November). +# +pccon+keys|OpenBSD PC keyboard keys, + kbs=^H, kcan=^C, kclr=^L, kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, + kcuu1=\E[A, kdch1=\E[3~, kend=\E[8~, kent=^M, kf1=\E[11~, + kf10=\E[21~, kf11=\E[23~, kf12=\E[24~, kf2=\E[12~, + kf3=\E[13~, kf4=\E[14~, kf5=\E[15~, kf6=\E[17~, kf7=\E[18~, + kf8=\E[19~, kf9=\E[20~, khome=\E[7~, kich1=\E[2~, + knp=\E[6~, kpp=\E[5~, krfr=^R, kspd=^Z, +pccon+acs0|simple ASCII pseudographics for OpenBSD PC console, + acsc=+>\,<-\^.v0#`+a\:f\\h#j+k+l+m+n+o~p-q-r-s_t+u+v+w+x!|!}#~o, +pccon+acs|default ASCII pseudographics for OpenBSD PC console, + acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, +pccon+colors|ANSI colors for OpenBSD PC console, + bce, + colors#8, ma#1, ncv#5, pairs#64, + op=\E[m$<2>, setab=\E[4%p1%dm$<2>, + setaf=\E[3%p1%dm$<2>, +pccon+base|base capabilities for OpenBSD PC console, + am, km, mc5i, npc, nxon, xenl, xon, + cols#80, it#8, lines#24, + bel=^G, clear=\E[H\E[2J$<50>, cr=^M, + cup=\E[%i%p1%d;%p2%dH$<5>, ed=\E[J$<50>, el=\E[K$<3>, + el1=\E[1K$<3>, enacs=\E(B\E)0, home=\E[H$<5>, ht=^I, + ind=^J, nel=\EE$<2>, rev=\E[7m$<2>, ri=\EM$<5>, rmacs=^O, + rmso=\E[m$<2>, rs2=\Ec$<50>, + sgr=\E[m$<2>%?%p1%p3%|%t\E[7m$<2>%;%?%p9%t\016%e\017%;, + sgr0=\E[m$<2>\017, smacs=^N, smso=\E[7m$<2>, +pccon0-m|OpenBSD PC console without colors & with simple ASCII pseudographics, + use=pccon+base, + use=pccon+acs0, + use=pccon+keys, +pccon0|OpenBSD PC console with simple ASCII pseudographics, + use=pccon0-m, + use=pccon+colors, +pccon-m|OpenBSD PC console without colors, + use=pccon+base, + use=pccon+acs, + use=pccon+keys, +pccon|OpenBSD PC console, + use=pccon-m, + use=pccon+colors, + #### NetBSD consoles # # pcvt termcap database entries (corresponding to release 3.31) After patching it will be possible to use several terminal types for AMD/Intel consoles: - "pccon" is suitable for color VGA diplay with 80x25 resolution, - "pccon-m" is suitable for black and white VGA diplay with 80x25 resolution, - "pccon0" is suitable for color VGA diplay with 80x40 and 80x50 resolutions, - "pccon0-m" is suitable for black and white VGA diplay with 80x40 and 80x50 resolutions. There is no pseudographics in the OpenBSD-4.9 fonts for 80x40 and 80x50 display resolutions, so I prepared separate terminal descriptions "pccon0" and "pccon0-m" for this case. If my patch will be useful I think that "pccon" may be the default terminal type for AMD/Intel consoles, so here is another patch against OpenBSD-CURRENT sources: --- ./etc/etc.amd64/ttys.orig Wed Jan 9 20:39:42 2008 +++ ./etc/etc.amd64/ttys Thu Sep 1 19:24:57 2011 @@ -3,19 +3,19 @@ # # name getty type status comments # -console "/usr/libexec/getty std.9600" vt220 off secure -ttyC0 "/usr/libexec/getty std.9600" vt220 on secure -ttyC1 "/usr/libexec/getty std.9600" vt220 on secure -ttyC2 "/usr/libexec/getty std.9600" vt220 on secure -ttyC3 "/usr/libexec/getty std.9600" vt220 on secure -ttyC4 "/usr/libexec/getty std.9600" vt220 off secure -ttyC5 "/usr/libexec/getty std.9600" vt220 on secure -ttyC6 "/usr/libexec/getty std.9600" vt220 off secure -ttyC7 "/usr/libexec/getty std.9600" vt220 off secure -ttyC8 "/usr/libexec/getty std.9600" vt220 off secure -ttyC9 "/usr/libexec/getty std.9600" vt220 off secure -ttyCa "/usr/libexec/getty std.9600" vt220 off secure -ttyCb "/usr/libexec/getty std.9600" vt220 off secure +console "/usr/libexec/getty std.9600" pccon off secure +ttyC0 "/usr/libexec/getty std.9600" pccon on secure +ttyC1 "/usr/libexec/getty std.9600" pccon on secure +ttyC2 "/usr/libexec/getty std.9600" pccon on secure +ttyC3 "/usr/libexec/getty std.9600" pccon on secure +ttyC4 "/usr/libexec/getty std.9600" pccon off secure +ttyC5 "/usr/libexec/getty std.9600" pccon on secure +ttyC6 "/usr/libexec/getty std.9600" pccon off secure +ttyC7 "/usr/libexec/getty std.9600" pccon off secure +ttyC8 "/usr/libexec/getty std.9600" pccon off secure +ttyC9 "/usr/libexec/getty std.9600" pccon off secure +ttyCa "/usr/libexec/getty std.9600" pccon off secure +ttyCb "/usr/libexec/getty std.9600" pccon off secure tty00 "/usr/libexec/getty std.9600" unknown off tty01 "/usr/libexec/getty std.9600" unknown off tty02 "/usr/libexec/getty std.9600" unknown off --- ./etc/etc.i386/ttys.orig Wed Jan 9 20:39:42 2008 +++ ./etc/etc.i386/ttys Thu Sep 1 19:24:57 2011 @@ -3,19 +3,19 @@ # # name getty type status comments # -console "/usr/libexec/getty std.9600" vt220 off secure -ttyC0 "/usr/libexec/getty std.9600" vt220 on secure -ttyC1 "/usr/libexec/getty std.9600" vt220 on secure -ttyC2 "/usr/libexec/getty std.9600" vt220 on secure -ttyC3 "/usr/libexec/getty std.9600" vt220 on secure -ttyC4 "/usr/libexec/getty std.9600" vt220 off secure -ttyC5 "/usr/libexec/getty std.9600" vt220 on secure -ttyC6 "/usr/libexec/getty std.9600" vt220 off secure -ttyC7 "/usr/libexec/getty std.9600" vt220 off secure -ttyC8 "/usr/libexec/getty std.9600" vt220 off secure -ttyC9 "/usr/libexec/getty std.9600" vt220 off secure -ttyCa "/usr/libexec/getty std.9600" vt220 off secure -ttyCb "/usr/libexec/getty std.9600" vt220 off secure +console "/usr/libexec/getty std.9600" pccon off secure +ttyC0 "/usr/libexec/getty std.9600" pccon on secure +ttyC1 "/usr/libexec/getty std.9600" pccon on secure +ttyC2 "/usr/libexec/getty std.9600" pccon on secure +ttyC3 "/usr/libexec/getty std.9600" pccon on secure +ttyC4 "/usr/libexec/getty std.9600" pccon off secure +ttyC5 "/usr/libexec/getty std.9600" pccon on secure +ttyC6 "/usr/libexec/getty std.9600" pccon off secure +ttyC7 "/usr/libexec/getty std.9600" pccon off secure +ttyC8 "/usr/libexec/getty std.9600" pccon off secure +ttyC9 "/usr/libexec/getty std.9600" pccon off secure +ttyCa "/usr/libexec/getty std.9600" pccon off secure +ttyCb "/usr/libexec/getty std.9600" pccon off secure tty00 "/usr/libexec/getty std.9600" unknown off tty01 "/usr/libexec/getty std.9600" unknown off tty02 "/usr/libexec/getty std.9600" unknown off --- ./etc/root/dot.login.orig Sun Dec 20 18:35:35 2009 +++ ./etc/root/dot.login Thu Sep 1 19:24:57 2011 @@ -6,9 +6,9 @@ set noglob histchars="" onintr finish if ( $?XTERM_VERSION ) then - eval `tset -IsQ '-munknown:?vt220' $TERM` + eval `tset -IsQ '-munknown:?pccon' $TERM` else - eval `tset -sQ '-munknown:?vt220' $TERM` + eval `tset -sQ '-munknown:?pccon' $TERM` endif finish: unset noglob histchars --- ./etc/root/dot.profile.orig Mon Dec 13 15:54:31 2010 +++ ./etc/root/dot.profile Thu Sep 1 19:24:57 2011 @@ -12,9 +12,9 @@ *i*) # interactive shell if [ -x /usr/bin/tset ]; then if [ X"$XTERM_VERSION" = X"" ]; then - eval `/usr/bin/tset -sQ '-munknown:?vt220' $TERM` + eval `/usr/bin/tset -sQ '-munknown:?pccon' $TERM` else - eval `/usr/bin/tset -IsQ '-munknown:?vt220' $TERM` + eval `/usr/bin/tset -IsQ '-munknown:?pccon' $TERM` fi fi ;; --- ./etc/skel/dot.login.orig Thu May 7 02:02:05 2009 +++ ./etc/skel/dot.login Thu Sep 1 19:24:57 2011 @@ -4,9 +4,9 @@ if ( ! $?TERMCAP ) then if ( $?XTERM_VERSION ) then - tset -IQ '-munknown:?vt220' $TERM + tset -IQ '-munknown:?pccon' $TERM else - tset -Q '-munknown:?vt220' $TERM + tset -Q '-munknown:?pccon' $TERM endif endif -- Alexei Malinin