You are not logged in.

#1 2011-09-07 21:52:40

jonnybarnes
Member
From: Manchester, UK
Registered: 2011-05-11
Posts: 129
Website

Setting the keyboard map with hotplugging

Just changed to awesome WM and my keyboard is slightly wrong. For a start I can't seem to produce the hash symbol at all.

The wiki suggests that input hotplugging should be favoured for keyboard configuration. I have my keymap set as uk in rc.conf and here's what /etc/X11/xorg.conf.d/10-evdev.conf says about keyboards:

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

And the output of setxkbmap:

$ setxkbmap -print -verbose 10
Setting verbose level to 10
locale is C
Applied rules from evdev:
rules:      evdev
model:      evdev
layout:     us
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+us+inet(evdev)
geometry:   pc(pc104)
xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwerty)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+us+inet(evdev)"     };
        xkb_geometry  { include "pc(pc104)"     };
};

This seems to suggest my keybaord is being loaded with the us keymap, which would explain why @ and " have swapped places. Anyone know what the correct course of action is to get my keyboard working correctly?

Cheers, Jonny

Offline

#2 2011-09-07 21:55:05

roygbiv
Member
Registered: 2011-05-18
Posts: 204

Re: Setting the keyboard map with hotplugging

Do you happen have any statements in your ~/.xinitrc, that includes setxkbmap?

Offline

#3 2011-09-07 21:57:39

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: Setting the keyboard map with hotplugging

It's very simple. Add

    Option    "XkbLayout"    "uk"

into that InputClass section.

Offline

#4 2011-09-07 22:07:31

jonnybarnes
Member
From: Manchester, UK
Registered: 2011-05-11
Posts: 129
Website

Re: Setting the keyboard map with hotplugging

So I added that line and rebooted, setxkbmap tells me I'm using the uk layout but none of the keys have changed, e.g. " and @. Hmm.

Offline

#5 2011-09-07 22:12:31

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

Re: Setting the keyboard map with hotplugging

restarted X ?


Forum Rules

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

Offline

#6 2011-09-07 22:18:38

jonnybarnes
Member
From: Manchester, UK
Registered: 2011-05-11
Posts: 129
Website

Re: Setting the keyboard map with hotplugging

Yes.

Offline

#7 2011-09-07 22:23:03

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: Setting the keyboard map with hotplugging

Ok, I just assumed the British layout is "uk". But it's not, it's "gb". For reference, layouts are in /usr/share/X11/xkb/symbols/

Offline

#8 2011-09-08 18:38:48

jonnybarnes
Member
From: Manchester, UK
Registered: 2011-05-11
Posts: 129
Website

Re: Setting the keyboard map with hotplugging

Using gb has worked thanks.

Offline

#9 2011-09-08 20:28:50

bernarcher
Forum Fellow
From: Germany
Registered: 2009-02-17
Posts: 2,281

Re: Setting the keyboard map with hotplugging

jonnybarnes,
please mark this thread as [SOLVED] by editing the title of your first post.


To know or not to know ...
... the questions remain forever.

Offline

Board footer

Powered by FluxBB