Xref: utzoo comp.sys.att:6743 alt.sources:712 Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!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. -----------------------------------cut here----------------------------------- #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