I use two keypads (Koolertron AE-SMKD72 Type A), that I use as one split keyboard. But they are recognized as two separate keyboards, what causes some problems:

  • I use an alternative keyboard layout but have a program running that maps keys back to QWERTZ when I press Ctrl because I don't want to relearn shortcuts as Ctrl-c. This program doesn't work when I press Ctrl on the left and u on the right keyboard.
  • There is a bug in Gnome that causes the screen to freeze when typing quickly on two different keyboards.
  • There is only one keyboard listed in /dev/input/by-id (probably because they are named identically).

That's why I would prefer if Linux would consider both keyboards halves as a single keyboard.

Is it possible to merge two keyboards into a single input device? Or alternatively, is it possible to merge to USB ports into one in a way that the two devices appear to be only one?


Not easily, but if you can program, you can grab (prevent them from passing events to anything but your program) both /dev/input/eventX devices, read keypresses from either, and output them in a single user-defined input device (/dev/uinput).

C example programs on how to use those kernel APIs exist. Other languages are also possible.

  • Actually that program grabs /dev/input/eventX and writes to /dev/uinput. But I prefer not to change that program because it's complicated (for someone not used to C). I would have to read from both event files in a loop and then sort by their timestamps. Joining the streams before reading could be so easy and logical and would (probably) help against that Gnome bug when typing on two different keyboards. – MaxGyver Jul 2 at 16:36
  • If all you want is to use one layout without control and one layout with control, why don't you just make your own keyboard layout e.g. with xmodmap? No need to run a program, and as that is done on the X level, it will treat all the key events in the same way. Edit Ah, it's Wayland. I haven't done keyboard mapping on Wayland yet. – dirkt Jul 2 at 17:28
  • Well, that program is designed to work also with Wayland but I don't (yet) use Wayland. As far as I know, I can't remap just Ctrl, Alt and Win combos with xmodmap. I would appreciate it if you show me, how to do it. That way, I didn't need sudo. – MaxGyver Jul 2 at 18:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.