Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
25
rated 0 times [  25] [ 0]  / answers: 1 / hits: 11695  / 1 Year ago, tue, november 22, 2022, 7:26:37

I want to connect two keyboard sets to my computer. Is it possible to set each for a specific language. So that there's no need to change language each time.



For example:




  • keyboard 1 types russian


  • keyboard 2 types english



More From » keyboard

 Answers
7

Using xinput and setxkbmap utilities, you can set from terminal so that each keyboard to have a different layout.



First, using xinput -list | grep key command, you have to find the device ID of each keyboard. Here s an example (my case):



$ xinput -list | grep key
⎣ 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)]
↳ Power Button id=8 [slave keyboard (3)]
↳ Sleep Button id=9 [slave keyboard (3)]
↳ 2.4GHz 2way RF Receiver id=10 [slave keyboard (3)]
↳ HP Webcam id=12 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=13 [slave keyboard (3)]
↳ HP WMI hotkeys id=15 [slave keyboard (3)]
↳ USB Keyboard id=16 [slave keyboard (3)]
↳ USB Keyboard id=17 [slave keyboard (3)]


And second, using setxkbmap -device <key_ID> -layout <layout_name>, set the layout which you wish for each keyboard. An example (for my keyboards):



setxkbmap -device 3 -layout ro    #My master keyboard is set to Romanian layout
setxkbmap -device 10 -layout us #The keyboard with id=10 is set to English (US) layout
setxkbmap -device 16 -layout ru #The keyboard with id=16 is set to EFor Russian layout

[#29773] Wednesday, November 23, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
allowiel

Total Points: 189
Total Questions: 103
Total Answers: 105

Location: Slovenia
Member since Thu, Mar 18, 2021
3 Years ago
;