5

I recently bought a new keyboard, it was cheap and of an unknown brand but i wasn't particularly worried. I found out that on linux pressing shift, super, left-ctrl or left-alt with this keyboard made no difference, it always take it as shift. I made some researches and it turns out the problem is the chipset used by the keyboard. I read that the only way to solve the problem is to write a driver for the keyboard, but, while working on it i found out that running sudo modprobe usbmon and then opening wireshark as sudo, unexpectedly fixes the problem... someone knows why this happen? and if there is a simpler way to trigger this change?

to be more specific:

  • i'm on xubuntu 18.04
  • dmyco is the brand of the keyboard
  • the result of lsusb is >> Bus 001 Device 004: ID 1c4f:0056 SiGma Micro
orlakio
  • 59
  • 1
  • 3

2 Answers2

2

In USB, there are two protocols that are applicable for keyboards: the main HID protocol, and the simplified "boot protocol" for keyboards.

Treating all modifier keys as shift keys might be caused by the system initially using the simplified boot keyboard protocol (the usbkbd module) instead of the main HID protocol, combined with the fact that the boot keyboard protocol support might be poorly implemented in that particular keyboard. But this is just a wild guess.

Apparently you might see a message like USB HIDBP Keyboard 14cf:0056 in dmesg output if the boot protocol is getting used. What does sudo dmesg | grep HID tell you? (Please add the results into your original question.)

Wireshark can also monitor USB traffic, and starting Wireshark with sudo might in fact trigger the loading of the usbmon module. But the fact that the usbmon module causes the problem to be fixed is intriguing... perhaps it causes a re-detection of USB devices so the full-featured usbhid driver module will get the keyboard for itself, or changes the timing of USB traffic just enough that whatever causes the "all modifiers are Shift" dumbness of this keyboard gets avoided.

telcoM
  • 87,318
  • 3
  • 112
  • 232
0

(I would have made this a comment, but it would have been unreadable.)

Since you don't have any answers yet, I can at least give you some reading that may help:

Here's a ton of stuff which relates to modifying the keyboard. Ignore the "compose" stuff to start with:

Joe
  • 1,368
  • 1
  • 16
  • 18