Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!van-bc!mtnsys!feng From: feng@mtnsys.wimsey.bc.ca (Feng Chen) Newsgroups: comp.unix.sysv386 Subject: Re: Switching VTs on Interactive UNIX (summary) Message-ID: <2859b0ba@mtnsys.wimsey.bc.ca> Date: 15 Jun 91 06:16:24 GMT References: <1991Jun12.052103.16367@wimsey.bc.ca> Organization: Mountain Systems Corp., Vancouver, Canada Lines: 85 In a previous article, I asked if Interactive UNIX could be made to switch VTs using Alt-F1, Alt-F2, etc. By far, the most popular solution (thanks, everyone!) was a program by Larry Campbell. It's quite short, so I enclose it below. A respondent indicated that it runs on ISC 2.0.2 as well, and I can confirm that it runs on ISC 2.2. I also received a program called fixkey, by Robert Lin, which remaps Alt-F1, etc., + some other keys, for use with Crisp. Send me email if you'd like a copy. -----8<----- cut here -----8<----- cut here -----8<----- cut here -----8<----- /* * Article 749 of comp.unix.i386: * Path: aloha1!uhccux!humu!nosc!helios.ee.lbl.gov!pasteur!ucbvax!tut.cis.ohio-state.edu!ukma!nrl-cmf!think!redsox!campbell * From: campbell@redsox.bsw.com (Larry Campbell) * Newsgroups: comp.sys.att,comp.unix.i386,alt.sources * Subject: Re: 6386 V.3.2 virtual terminal switch remapping? * Summary: Here's a program to do it * Message-ID: <781@redsox.bsw.com> * Date: 18 Jun 89 04:15:02 GMT * References: <484@oglvee.UUCP> * Reply-To: campbell@redsox.UUCP (Larry Campbell) * Organization: The Boston Software Works, Inc. * Lines: 52 * * The manual entry is incomplete; you have to scrutinize kd.h carefully. * I'm glad Jim's posting (Hi, Jim!) prompted me to look this up and write * the following program (which I call kset, but you can call Nancy if you * like). * * This program lets you switch consoles with Alt-F1 through Alt-F8 (instead * of the irritating Alt-Sysreq F1 through Alt-Sysreq F8); modify to taste. * I wrote and tested it on Interactive 386/ix v2.0.1, but I assume it will * also work on the AT&T SVR3.2 release. */ #include #include #include #include extern void exit(); extern void perror(); struct kbentry kbetab[] = { { 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 + 0) }, { 0, 0, 0 } }; main() { int i; for (i = 0; kbetab[i].kb_index; i++) { if (ioctl(0, KDSKBENT, &kbetab[i]) == -1) { perror("kset: KDGKBENT ioctl failed"); exit(1); } } return 0; } /* * Larry Campbell The Boston Software Works, Inc. * campbell@bsw.com 120 Fulton Street * wjh12!redsox!campbell Boston, MA 02146 */ -----8<----- cut here -----8<----- cut here -----8<----- cut here -----8<----- -- Feng Chen van-bc!mtnsys!feng feng@mtnsys.wimsey.bc.ca