Switching VTs on Interactive UNIX
Tan Bronson
tan at bronson.uucp
Wed Jun 19 08:16:20 AEST 1991
In article <1991Jun12.052103.16367 at wimsey.bc.ca> feng at wimsey.bc.ca (Feng Chen) writes:
>On SCO UNIX, switching VTs is done with Alt-F1, Alt-F2, etc., instead
>of with Alt-SysReq F1, etc. Is it possible to duplicate the SCO
>behaviour on Interactive UNIX 3.2, version 2.2? I've had a look at
>keyboard(7) and <sys/kd.h>, but have only been able to shuffle the
>VT-switching keys around; I haven't been able to reduce their number.
There is good news and bad news. The good new is that the attached
program was provided by someone at Interactive and it seems to work.
The bad news is that after this program is run, switching to/from
a VT running X can wedge the keyboard, rendering it useless for X.
Sometimes switching back and forth can fix the X server, but
when I reported this bug to Interactive, they recommended that I
stop using this tool and I have not had the problem since.
I've stopped using VT's now that I run X, so this is not too much
of a problem for me.
====== xenix_ix.c =====
#include <sys/types.h>
#include <sys/at_ansi.h>
#include <sys/kd.h>
struct kbentry table[] = {
{ K_ALTTAB, 59, SPECIALKEY | (K_VTF +1) },
{ K_ALTTAB, 60, SPECIALKEY | (K_VTF +2) },
{ K_ALTTAB, 61, SPECIALKEY | (K_VTF +3) },
{ K_ALTTAB, 62, SPECIALKEY | (K_VTF +4) },
{ K_ALTTAB, 63, SPECIALKEY | (K_VTF +5) },
{ K_ALTTAB, 64, SPECIALKEY | (K_VTF +6) },
{ K_ALTTAB, 65, SPECIALKEY | (K_VTF +7) },
{ K_ALTTAB, 66, SPECIALKEY | (K_VTF +8) },
{ K_ALTTAB, 67, SPECIALKEY | (K_VTF +9) },
{ K_ALTTAB, 68, SPECIALKEY | (K_VTF +0) },
};
main ()
{
int i;
for (i = 0; i < sizeof(table)/sizeof(struct kbentry); ++i)
if (ioctl(0, KDSKBENT, &table[i]) == -1) {
perror("xenix_in: KDSKBENT failed");
exit(1);
}
}
--
Tan Bronson tan at Microvation.COM (or tan at bronson.UUCP)
Microvation Consultants 20 Sperry Road Madison, CT 06443
Voice: (203)-421-5061 Fax: (203)-421-5292
More information about the Comp.unix.sysv386
mailing list