You are not logged in.

#1 2012-06-15 21:26:14

benjumanji
Member
Registered: 2011-09-15
Posts: 9

[Solved] keyboard layout not being picked up

So I recently ran into a problem where my keyboard layout is not being correctly set up. When I run

[ben@ksack ~]$ setxkbmap -print -verbose

I am greeted with

Couldn't interpret _XKB_RULES_NAMES property
Use defaults: rules - 'base' model - 'pc105' layout - 'us'
Trying to build keymap using the following components:
keycodes:   xfree86+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+us+inet(pc105)
geometry:   pc(pc105)
xkb_keymap {
        xkb_keycodes  { include "xfree86+aliases(qwerty)"       };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+us+inet(pc105)"     };
        xkb_geometry  { include "pc(pc105)"     };
};

My config in /etc/X11/xorg.conf.d/10-evdev.conf is the following

#
# Catch-all evdev loader for udev-based systems
# We don't simply match on any device since that also adds accelerometers
# and other devices that we don't really want to use. The list below
# matches everything but joysticks.

Section "InputClass"
        Identifier "evdev pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
EndSection

Section "InputClass"
        Identifier "evdev keyboard catchall"
        MatchIsKeyboard "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
        Option "XkbLayout" "gb"
EndSection


Section "InputClass"
        Identifier "evdev touchpad catchall"
        MatchIsTouchpad "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
EndSection

Section "InputClass"
        Identifier "evdev tablet catchall"
        MatchIsTablet "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
EndSection

Section "InputClass"
        Identifier "evdev touchscreen catchall"
        MatchIsTouchscreen "on"
        MatchDevicePath "/dev/input/event*"
        Driver "evdev"
EndSection

If I run

setxkbmap -layout gb

that fixes the problem but I can't figure out

  1. Why my config stopped working

  2. Where to include setxkbmap such that I get my map loaded correctly

 

Any and all help greatly appreciated.

Last edited by benjumanji (2012-06-15 23:00:58)

Offline

#2 2012-06-15 21:40:50

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [Solved] keyboard layout not being picked up

benjumanji wrote:

Where to include setxkbmap such that I get my map loaded correctly

include

setxkbmap -layout gb

in your .xinitrc just before you start you window manager.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#3 2012-06-15 21:49:39

benjumanji
Member
Registered: 2011-09-15
Posts: 9

Re: [Solved] keyboard layout not being picked up

Thanks for the quick response!

my .xinitrc now looks like this:

#!/bin/sh
xrdb -merg "$HOME/.Xresources"
setxkbmap -layout gb
exec awesome

but I still end up with the same problem, alas.

Offline

#4 2012-06-15 21:50:55

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [Solved] keyboard layout not being picked up

My bad, put in a & after the setxkbmap line so that the WM can start.

By the way, is your LOCALE set in rc.conf? That will only set it in tty, not in X. is that what you meant that you config worked and now doesn't ?

xkb_symbols   { include "pc+us+inet(pc105)"     };

This tells me its being recognized as a US keyboard.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#5 2012-06-15 22:04:49

benjumanji
Member
Registered: 2011-09-15
Posts: 9

Re: [Solved] keyboard layout not being picked up

ahhh. My locale is certainly wrong. I shall fix that, but that shouldn't effect the way that X configures the keyboard, right? I changed it anyway. Problem remains. I also fixed up my .xinitrc, that didn't help either. I think there must be something deeply wrong somewhere.

What I mean by worked and then didn't is that at my keyboard was fine (gb) with X, then at some point after an upgrade it ceased to work properly i.e. was being configured as US kb.

Offline

#6 2012-06-15 22:58:58

benjumanji
Member
Registered: 2011-09-15
Posts: 9

Re: [Solved] keyboard layout not being picked up

I'm a moron. I needed to change .xsession, because I was logging in remotely. Sorry for wasting your time. Added setxkbmap to .xsession and everything works perfectly.

Thanks!

Offline

Board footer

Powered by FluxBB