I can positively say that what you want to do is indeed possible. I achieved the specified scenario by first
sudo cat /dev/input/event(0,1,2..)
while typing on each keyboard to ensure that they were recognized as separate devices. Then I simply applied trial-and-error, experimenting with
setxkbmap -device (1-x) us
.
I discovered that setxkbmap -device 1 us
configured both (all) keyboards, while setxkbmap -device 6 us
only affected the secondary. Of relevance is perhaps that they both were connected via PS/2.
This of course is not guaranteed to work for you, and doesn't even classify as a proper answer, but it confirms that it's at all possible. I don't know according to which scheme the individual keyboards are named in /dev/input
, but I'm sure that the names can be specified in udev, making it possible to put the appropriate setxkbmap
command in /etc/rc.local
or similar.
Hi there, I did this and it works great for everything but the arrow keys and other directional keys (which no longer work at all). It could be that the keyboard is one of those ergonomic ones that have funky key mappings...any idea how to get those working again? – btelles – 2011-11-03T13:12:34.577
9So what's the best way to set this configuration at boot instead of having to manually invoke setxkbmap? – Richard Turner – 2013-06-25T10:53:26.533