Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!think.com!mintaka!yale!babss!bronson!tan From: tan@bronson.uucp (Tan Bronson) Newsgroups: comp.unix.sysv386 Subject: Re: Switching VTs on Interactive UNIX Message-ID: <1991Jun18.221620.6574@bronson.uucp> Date: 18 Jun 91 22:16:20 GMT References: <1991Jun12.052103.16367@wimsey.bc.ca> Organization: Microvation Consultants, Madison CT 06443 Lines: 48 In article <1991Jun12.052103.16367@wimsey.bc.ca> feng@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 , 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 #include #include 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@Microvation.COM (or tan@bronson.UUCP) Microvation Consultants 20 Sperry Road Madison, CT 06443 Voice: (203)-421-5061 Fax: (203)-421-5292