You are not logged in.

#1 2011-11-11 08:59:57

Delcaran
Member
From: ud.fvg.it
Registered: 2010-11-14
Posts: 25
Website

[RESOLVED] USB keyboard changes layout after reconnect

A strange issue with my USB keyboard..
If I boot up my laptop with USB plugged in, layout is it_IT and everything works fine.
If I plug-in my keyboard when arch is up, layout changes to American, but only under X (in tty it's still Italian) and only on the USB keyboard, the laptop's keyboard is still in Italian.
All locale settings are ok in rc.conf, locale.sh and xorg.conf (I use nvidia drivers), so I think it may be something with udev rules, but I don't know what...
Any suggestions?

Last edited by Delcaran (2011-11-14 13:33:45)


I apologize for my English...

Offline

#2 2011-11-12 15:42:10

Markus00000
Member
Registered: 2011-03-27
Posts: 318

Re: [RESOLVED] USB keyboard changes layout after reconnect

Not sure if this applies to newly connected keyboards. In .xinitrc I have:

setxkbmap -layout '<my layout>'

If it does not affect the keyboard that you connect, you might be able to run this command (either manually or automatically) whenever your keyboard is connected.

Offline

#3 2011-11-13 16:40:42

Delcaran
Member
From: ud.fvg.it
Registered: 2010-11-14
Posts: 25
Website

Re: [RESOLVED] USB keyboard changes layout after reconnect

Yep, that works! Now I've to execute it on keyboard connection... I always had problems with udev (some rules work, some others not always), so I was wondering how can I execute this command on EVERY usb connection (just to be sure it will be executed when I connect the keyboard)..


I apologize for my English...

Offline

#4 2011-11-13 18:52:03

siriusb
Member
From: Hungary
Registered: 2010-01-01
Posts: 422

Re: [RESOLVED] USB keyboard changes layout after reconnect

Or you can create a file in /etc/X11/xorg.conf.d. E.g. 11-usb-keyboard-conf:

Section "InputClass"
    Identifier         "Keyboard Defaults"
    MatchIsKeyboard	   "yes"
    MatchProduct       "keyboard"
    Option  "XkbLayout"  "it"
EndSection

Just replace the value with the ones you can find in Xorg.0.log.

Every time you plug your keyboard in, the relevant rules will be applied.

Offline

#5 2011-11-14 13:33:28

Delcaran
Member
From: ud.fvg.it
Registered: 2010-11-14
Posts: 25
Website

Re: [RESOLVED] USB keyboard changes layout after reconnect

Thank you siriusb! That worked like a charm!


I apologize for my English...

Offline

Board footer

Powered by FluxBB