Remapping the keyboard

John Temples john at jwt.UUCP
Sun Aug 19 05:04:42 AEST 1990


I'm trying to do some keyboard remapping under ESIX rev. D.  First, I want
to be able to assign a unique value to each of the base, shifted,
control, and alt values of the F-keys.  Second, I want to reassign
the VT switch codes to ALT-1 through ALT-0.  Third, I want control-2
to generate a NUL, rather than a 2.

I found a program called /etc/setkey which lets the function keys be
remapped as I wish (although it doesn't recognize F11 and F12).  But
I have been unable to get the VT switch codes to remap.  I used the
following code to try to get ALT-1 to switch to the first VT:


struct kbentry ent;

ent.kb_table = K_ALTTAB;
ent.kb_index = 2;
ent.kb_value = K_VTF;

if (ioctl(0, KDSKBENT, &ent) == -1)
	perror("KDSKBENT");


It executes without an error, and the default ESC-N mapping is
removed from ALT-1.  But it won't do a VT switch -- I get nothing.

As for remapping control-2, I can't see how control keys are
remapped.  keyboard(7) shows eight different entries for each key,
but it seems you can only remap the base, shift, alt, and alt-shift
of each key.  Are there some other ioctl() calls that I should be
looking at?
-- 
John W. Temples -- john at jwt.UUCP (uunet!jwt!john)



More information about the Comp.unix.i386 mailing list