Messages in this thread | | | Date | Sun, 1 Feb 2004 16:14:52 +0100 | From | Andries Brouwer <> | Subject | Re: 2.6 input drivers FAQ |
| |
On Sun, Feb 01, 2004 at 02:50:01PM +0100, Vojtech Pavlik wrote:
> Sorry. I was typing that from memory. I'll fix it. Btw, could you make > the kbd package accept scancodes in the 0x80-0xff range (same as e000 to > e07f), if it is not yet there? And how about scancodes in the > 0x100-0x1ff range? Will those work?
What is needed for the 2.6 kernel is rather volatile (and maybe the present kernel version is not quite final yet). But setkeycodes does ioctl(fd,KDSETKEYCODE,&a) where
a.keycode = atoi(argv[2]); a.scancode = strtol(argv[1], &ep, 16); if (a.scancode >= 0xe000) { a.scancode -= 0xe000; a.scancode += 128; /* some kernels needed +256 */ }
The 2.6.1 kernel is still very messy, with code
if (atkbd->emul) { if (--atkbd->emul) goto out; code |= (atkbd->set != 3) ? 0x80 : 0x100; }
where the representation of the e0 prefix depends on the current scancode mode. A bad idea.
> One more question: Will kbdrate work properly (use ioctls) when compiled > on a 2.6 kernels?
kbdrate first tries the KDKBDREP ioctl, then the KIOCSRATE ioctl, and if both fail it will try to write to /dev/port.
Andries - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |