You are not logged in.

#1 2019-09-26 23:58:56

causasui
Member
Registered: 2013-04-04
Posts: 65

[SOLVED] Keyboard layout on external keyboard reset by KVM switch

I have a laptop. I use the dvorak layout, set in /etc/vconsole.conf and again in .xinitrc via setxkbmap.  I also have an external USB keyboard that I connect to the laptop through a KVM switch.

Problem: When I use the switch to swap the keyboard to my arch laptop, the inputs from the external keyboard are in qwerty until I run `setxkbmap dvorak` again in a terminal emulator. The inputs from the built-in keyboard are in dvorak.

How can I troubleshoot this?

Last edited by causasui (2019-10-18 23:38:03)

Offline

#2 2019-09-27 07:01:12

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,341

Re: [SOLVED] Keyboard layout on external keyboard reset by KVM switch

The keyboard gets removed and virtually re-attached and setxkbmap is (all xkb changes are) transitional.
Use an xorg configlet and a keyboard match: https://wiki.archlinux.org/index.php/Xo … tion_files to have the settings auto-apply when the device is re-attached.

Offline

#3 2019-09-27 13:32:03

causasui
Member
Registered: 2013-04-04
Posts: 65

Re: [SOLVED] Keyboard layout on external keyboard reset by KVM switch

The keyboard gets removed and virtually re-attached and setxkbmap is (all xkb changes are) transitional.

Transitional from what though? Is there no way to change the default without recompiling x11?

Offline

#4 2019-09-27 14:18:06

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,341

Re: [SOLVED] Keyboard layout on external keyboard reset by KVM switch

Transitional "from" US ASCII.
Rephrasing: "volatile" - any change will be gone with the device.

You don't have to "recompile x11", please actually read the link I posted.

Offline

#5 2019-09-27 17:17:14

causasui
Member
Registered: 2013-04-04
Posts: 65

Re: [SOLVED] Keyboard layout on external keyboard reset by KVM switch

Transitional "from" US ASCII.
Rephrasing: "volatile" - any change will be gone with the device.

Right, I'm just surprised that persistent changes to the default keyboard layout can't be made without binding them to a device. But maybe I shouldn't be.

You don't have to "recompile x11", please actually read the link I posted.

No need to be like that. I appreciate the help. I'm just curious to learn a little more about how it all works.

Offline

#6 2019-09-27 20:06:43

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,341

Re: [SOLVED] Keyboard layout on external keyboard reset by KVM switch

Right, I'm just surprised that persistent changes to the default keyboard layout can't be made without binding them to a device

Because that is not a thing.
And I "am like that" because if you actually had read the link you would by now know this…

Offline

#7 2019-10-18 23:37:50

causasui
Member
Registered: 2013-04-04
Posts: 65

Re: [SOLVED] Keyboard layout on external keyboard reset by KVM switch

seth wrote:

Because that is not a thing.
And I "am like that" because if you actually had read the link you would by now know this…

Yes, I know now that it's not a thing. Since I didn't know before, I was surprised. I'm not sure why you're annoyed that I didn't know until I read it though, since I'm here in the newbie corner asking for help and all.

Anyhow, since this is now high in the pagerank for searches on this problem, here's the configuration I'm using:

/etc/X11/xorg.conf.d/90-keyboard.conf
---
Section "InputClass"
        Identifier  "keyboard"
        MatchIsKeyboard "on"
        Driver           "libinput"
        Option          "XkbLayout"     "us"
        Option          "XkbVariant"    "dvorak"
EndSection

Last edited by causasui (2019-10-18 23:39:15)

Offline

#8 2019-10-19 06:29:45

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,341

Re: [SOLVED] Keyboard layout on external keyboard reset by KVM switch

you're annoyed that I didn't know until I read it though

I'm not and I certainly don't expect magic knowledge. I simply asked you to

seth wrote:

please actually read the link I posted.

I'm starting to get annoyed with your attitude, though.

Offline

Board footer

Powered by FluxBB