I've got Kubuntu 20.04 and  there's no /usr/src/linux.    In /usr/src there are several directories with linux in the name, one is linux-headers-5.4.0-48.  In each one there's a drivers/hid directory, but I didn't find the maker of the keyboard.  I bought it off that website named after the big river in Brazil.  The brand  name was Nulea.  However, I did find a way to stop that key from annoying me when I hit it by accident.  I took the key off and removed that little bit of plastic that was under the key and replaced it.

About a year ago, I  wanted to be able to access the degree (°) without launching an app to show  the seldom used characters then finding the one I wanted and copying it and pasting it.  I found a way to modify the windows key so if I hold it down while pressing o twice, I get °.   The problem is that I forgot how or where I found out how to do that.  Any idea how to do that?  Thanks.

On 7/12/22 17:03, Matt Graham via PLUG-discuss wrote:
On 2022-07-12 14:30, Jim via PLUG-discuss wrote:
one is a printer key.  When I press it xev tells me it's sending
the Control_L and p codes at the same time. I want to remap it
. so it sends only one keycode.  Here's what xev shows when I
press it.
KeyPress event,
    state 0x10, keycode 37 (keysym 0xffe3, Control_L)
KeyPress event,
    state 0x14, keycode 33 (keysym 0x70, p)
KeyRelease event,
    state 0x14, keycode 37 (keysym 0xffe3, Control_L)
KeyRelease event,
    state 0x10, keycode 33 (keysym 0x70, p)
If I disable keycode 33, the p key also doesn't work.  Is there
some way to get it to send just one code?

If this is anything like other HID devices that I've seen that do this, it will not be easy.  I have a mouse where one of the extra buttons generates KeyPress events for Shift_L, then Meta_L, then KeyRelease events for ISO_Left_Tab, Meta_L, and Shift_L.  I assume that this is being done at a rather low level in the device.  HID things can send key events if they want, that's part of being HID.  There is usually no way (or no obvious way?) to change their multiple-key event sending.

I have not had a great deal of trouble with this because it's easy to not hit that button.  If I were really motivated to fix it, I'd go digging in /usr/src/linux/drivers/hid/ and find the file that contains the code for your manufacturer's devices.  Then learn the HID stuff and set things up so that if the scancode for this key comes in, you send 1 event of Xfree86_Print (or whatever other keysym you think is appropriate) instead of Control_L and p. Hacky, but you have the option.  The hid-prodikeys.c file shows an example of handling a USB keyboard that also has piano keys and modifier keys, it's long, but it may be a useful file to look at.

---------------------------------------------------
PLUG-discuss mailing list - [email protected]
To subscribe, unsubscribe, or to change your mail settings:
https://lists.phxlinux.org/mailman/listinfo/plug-discuss

Reply via email to