2

So I have gotten a Jelly Comb keyboard as a gift for christmas. But the problem is, that according to the manufacturer, the keyboard is intended to be used on Windows. So now I have the following problems:

  1. If I press the Num Lock, the keyboard starts acting weird; most of the keys stop working, except for some numbers and some letters that act as numbers, while the Num Lock can't be turned off anymore. I tried using numlockx off , so that prevents Num Lock from turning on when i connect the keyboard to the computer, but I sometimes like to use numpad, which I cannot do atm.

  2. F1-F12 don't work. The F keys act also as multimedia keys by pressing the Fn, or at least that is how it should be. But in my case, pressing any of the F keys results in some random multimedia action (random as different from the one printed on the key), but when I press it using the Fn key, its effect just changes to some other multimedia action, again to something else than printed on the key.

  3. When I checked the output from xev, I saw that some of the keys have the same key code. For example F11 prints the same output as Fn+F4. Here is the example output:

KeyRelease event, serial 28, synthetic NO, window 0x3e00001, root 0x5c4, subw 0x0, time 2572602, (456,941), root:(521,1045), state 0x0, keycode 33 (keysym 0x70, p), same_screen YES, XLookupString gives 1 bytes: (70) "p" XFilterEvent returns: False KeymapNotify event, serial 28, synthetic NO, window 0x0, keys: 4294967236 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 KeymapNotify event, serial 28, synthetic NO, window 0x0, keys: 4294967236 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 

The first one is for some random letter, while the last two are from F11 and Fn+F4.

For additional info, I am running Ubuntu 20.04 with Gnome.

So my question is, if there is any way to use this keyboard normally on linux. I would imagine, that there is some way to 'tell' the OS to interpret the keyboard as Windows does, but I was unsuccessful in finding anything like that.

EDIT:

So as @dirkt recommended, I checked the output of evtest, and I get the following lines for Fn+F11 and F4 respectively:

Event: time 1609244073.713496, type 1 (EV_KEY), code 113 (KEY_MUTE), value 1 Event: time 1609244073.713496, -------------- SYN_REPORT ------------ Event: time 1609244073.738779, type 1 (EV_KEY), code 113 (KEY_MUTE), value 0 Event: time 1609244073.738779, -------------- SYN_REPORT ------------ Event: time 1609244076.661538, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00e2 Event: time 1609244076.661538, type 1 (EV_KEY), code 113 (KEY_MUTE), value 1 Event: time 1609244076.661538, -------------- SYN_REPORT ------------ Event: time 1609244076.687504, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00e2 Event: time 1609244076.687504, type 1 (EV_KEY), code 113 (KEY_MUTE), value 0 Event: time 1609244076.687504, -------------- SYN_REPORT ------------ 

Both have the same code (113 KEY_MUTE), but I get an extra line Event: time 1609244076.687504, type 4 (EV_MSC), code 4 (MSC_SCAN), value c00e2, when I do not press Fn. The same goes for all the regular keys like letters and numbers. But when I use the F1-F12 in the combination with the Fn key, the line disappears. So my follow up question is, can I make use of that extra line, so that linux distinguishes between keys with the same keycode, and if so, how?

2
  • What does "as normally" mean? I never use the NumLock key or any of the Function keys... If the "ordinary" keys work (you never say anything about this), then you should be able to use the keyboard as normal. Commented Dec 28, 2020 at 23:34
  • @Kusalananda Well I often use function keys, especially the volume ones, as well as numpad, for cases when I have to enter lots of numbers. And even if I would go without the function keys and the numpad, there are still F1-F12 keys which don't work. I mean normally as with full functionality. Commented Dec 29, 2020 at 7:13

1 Answer 1

2

Partial answer:

according to the manufacturer, the keyboard is intended to be used on Windows.

That probably means it has a Windows-specific driver to deal with the non-standard parts of this keyboard.

As this driver won't be available on Linux, you have the choice of either using it as it is, or reverse-engineering the differences, and then trying to adapt Linux to deal with those. The latter will require time and effort.

Google for Jelly Comb shows it's probably a wireless keyboard with an USB receiver (you didn't say, I have to guess).

Quick primer on how the keyboard stack works on Linux:

For USB devices, there's something called HID (human interface device) protocol, which is a standard on how to encode communication with devices like keyboards. Use lsusb to identify your keyboards USB endpoint or endpoints (some keyboards have several), use lsusb -v to find out if the support HID.

The kernel decodes the HID events (and you can inspect the HID descriptor that describes those events, search this stackexchange or the superuser stackexchange for answers with details). Then the kernel passes them on to the input layer.

Input layer devices show up as /dev/event/input*. Have a look at dmesg after boot to see which ones your keyboard gets. You can use evtest to inspect events coming from them.

From the input layer, X or Wayland interprets the events, and use their keyboard mapping to do something with it.

So do check key combinations that are not working both with evtest and xev to see where funny things happen.

Your KeymapNotify event means that something picked up a code that causes the keyboard mapping to change. That may be because of the keyboard mapping you are using, or something that's installed on your desktop.

Don't expect the Fn to work. This key is non-standard, and every laptop manufacturer or keyboard manufacturer have their own way of doing something with it.

2
  • Thank you for the answer and sorry for the lack of information about the keyboard; yes it is the wireless one as you suspected. I have tried using the evtest command and have expanded on my question to include the output, since it was too long to post as a comment. Commented Dec 29, 2020 at 15:10
  • I don't think the existing keyboard maps can handle "MISC" events (but go ahead and read the docs, maybe they can). It's also possible you get additional HID events for these, so work your way through the HID descriptor, and maybe also dump the hidraw device for it. Another option is that you have multiple input-layer/hid-layer devices for your keyboard, and you'll get additional events on one of them (they won't show up unless you first identify all devices you get, and dump all of them). Commented Dec 29, 2020 at 15:18

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.