Comments on: could you guys talk to those other guys and then https://www.lafferty.ca/2005/11/18/could-you-guys-talk-to-those-other-guys-and-then/ Rich Lafferty's OLD blog Sun, 11 Feb 2007 18:21:36 +0000 hourly 1 https://wordpress.org/?v=5.9.2 By: leolo https://www.lafferty.ca/2005/11/18/could-you-guys-talk-to-those-other-guys-and-then/comment-page-1/#comment-2223 Sat, 19 Nov 2005 00:29:47 +0000 #comment-2223 You could mess with the USB hot-plug stuff. Detect when the keyboard is plugged in and change the key mapping.

Look in /etc/hotplug/usb.agent for details. You’ll probably need to create a /etc/hotplug/usb/hib script that checks $PRODUCT, remaps the keyboard if it matches your keyboard (lsusb to find the ID) and creates a script in $REMOVER that switches the map back.

Or you could swap keycaps :-)

And yes, this is annoying. Dell probably has a small driver in the pre-installed Windows that does the same thing. I suspect that Dell made neither the keyboard, nor the laptop, so they don’t have as much control over the keycodes as one would think.

]]>
By: Rich https://www.lafferty.ca/2005/11/18/could-you-guys-talk-to-those-other-guys-and-then/comment-page-1/#comment-2222 Sat, 19 Nov 2005 00:08:57 +0000 #comment-2222 I don’t think so — all that gets exposed to the X server are keycodes. I think I’ll disassemble the keyboard and switch around the keycaps before I’d start messing with the kernel HID stuff.

]]>
By: brad https://www.lafferty.ca/2005/11/18/could-you-guys-talk-to-those-other-guys-and-then/comment-page-1/#comment-2221 Fri, 18 Nov 2005 23:28:56 +0000 #comment-2221 Hahahah.

Does the kernel events layer also include the sysfs deviceid that originated the event? I wonder if you could map the tuple (USB device id, keyboard key) to a function, instead of just the keyboard key.

Ugggly.

]]>