Created
February 13, 2018 13:27
-
-
Save hencjo/0710d51c5ba51e0aeb2d905f1e3a38f3 to your computer and use it in GitHub Desktop.
Xorg: Two keyboards with different keyboard layout.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use xinput to find your keyboards. | |
$ xinput | |
⎡ Virtual core pointer id=2 [master pointer (3)] | |
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] | |
⎜ ↳ SynPS/2 Synaptics TouchPad id=11 [slave pointer (2)] | |
⎜ ↳ TPPS/2 IBM TrackPoint id=12 [slave pointer (2)] | |
⎜ ↳ Logitech Performance MX id=14 [slave pointer (2)] | |
⎜ ↳ E-Signal USB Gaming Keyboard id=16 [slave pointer (2)] | |
⎣ Virtual core keyboard id=3 [master keyboard (2)] | |
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)] | |
↳ Power Button id=6 [slave keyboard (3)] | |
↳ Video Bus id=7 [slave keyboard (3)] | |
↳ Sleep Button id=8 [slave keyboard (3)] | |
↳ Integrated Camera id=9 [slave keyboard (3)] | |
↳ AT Translated Set 2 keyboard id=10 [slave keyboard (3)] | |
↳ ThinkPad Extra Buttons id=13 [slave keyboard (3)] | |
↳ Sennheiser Sennheiser 3D G4ME1 id=15 [slave keyboard (3)] | |
↳ E-Signal USB Gaming Keyboard id=17 [slave keyboard (3)] | |
# My keyboards are id 10 (laptop integrated) and id 17 (external keyboard). | |
# Now, set my external keyboard to be Swedish layout, and my internal to Dvorak: | |
$ setxkbmap -device 17 se | |
$ setxkbmap -device 10 dvorak | |
# Done! |
Shouldn't it be possible to set the mapping in an evdev confg file in
/etc/X11/xorg
directory? If possible I think this is more natural than using an udev rule for this. Unfortunately I do not know how to achieve it.
I don't have a xorg
folder in /etc/X11/
(ubuntu 21.04) should I create that?
Sorry, the correct directory is /etc/X11/xorg.conf.d/
, at least in ArchLinux
If you don't have neither directory, maybe you can try searching where the .conf
files are in /etc/X11, I suppose there should be some .conf
files in there.
Hi, I'd like to make the space key of the second keyboard output hyper or some other key. Does somebody know how do do that?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Well, it did not take long, I have tried myself doing a configuration that allows me changing between "us" and "us intl" in the internal laptop keyboard, and between "es", "us" and "us intl" for external USB keyboards. It works like a charm: