You are not logged in.

#1 2011-11-15 18:05:25

Ecky
Member
Registered: 2011-09-23
Posts: 37

[Solved] Cannot get Arch to use UK keyboard

Hi

Installed arch (64-bit) with a fairly minimalistic KDE and all seemed to go fairly well except for a couple of small issues, some I've already sorted myself, some I've not started to figure out yet, but this langauage thing is being a bit of a pain

Here is what I have in rc.conf:

LOCALE="en_GB.UTF-8"
DAEMON_LOCALE="no"
HARDWARECLOCK="UTC"
TIMEZONE="Europe/London"
KEYMAP="uk"
CONSOLEFONT="161"
CONSOLEMAP=
USECOLOR="yes"

Here is the output of 'locale' in konsole:

$ locale
LANG=en_GB.UTF-8
LC_CTYPE="en_GB.UTF-8"
LC_NUMERIC="en_GB.UTF-8"
LC_TIME="en_GB.UTF-8"
LC_COLLATE="en_GB.UTF-8"
LC_MONETARY="en_GB.UTF-8"
LC_MESSAGES="en_GB.UTF-8"
LC_PAPER="en_GB.UTF-8"
LC_NAME="en_GB.UTF-8"
LC_ADDRESS="en_GB.UTF-8"
LC_TELEPHONE="en_GB.UTF-8"
LC_MEASUREMENT="en_GB.UTF-8"
LC_IDENTIFICATION="en_GB.UTF-8"
LC_ALL=

I have kde-l10n-en_GB installed and in System Settings > Locale > Languages I have American English in the left-hand 'Available' pane with British English in the right-hand 'Preffered' pane.  I actually tried removing kde-l10n-en_US with pacman -R but it reports 'error: 'kde-l10n-en_US': target not found'

So on the surface it looks like it should be using the UK keyboard in KDE but it's using US

No doubt I've done something wrong somewhere to cause this, spent an hour or two googling and trawling the Arch wiki but haven't been able to find anything that helps me resolve it, any assistance offered most appreciated

Last edited by Ecky (2011-11-15 23:52:18)


Mainboard:  Gigabyte 880GMA-UD2H  -  Processor:  Amd Phenom X6 1090T  -  Memory:  8GB (2x4Gb) Corsair Vengeance 1600Mhz DDR3  -  Graphics:   XFX Ati Radeon HD 6870

Offline

#2 2011-11-15 18:22:44

perbh
Member
From: Republic of Texas
Registered: 2005-03-04
Posts: 765

Re: [Solved] Cannot get Arch to use UK keyboard

Nope - that 'KEYMAP="uk"' is for the console font only - not 'X'
You may have to make a short xorg.conf with just the following:

Section "InputDevice"
	Identifier  "Keyboard0"
	Driver      "keyboard"
	Option      "CoreKeyboard"
	Option      "XkbRules" "xorg"
	Option      "XkbLayout" "uk"
EndSection

Alternatively, you could use the 'setxkbmap' command

Last edited by perbh (2011-11-15 18:23:08)

Offline

#3 2011-11-15 18:25:30

null
Member
Registered: 2009-05-06
Posts: 398

Re: [Solved] Cannot get Arch to use UK keyboard

you need a /etc/X11/xorg.conf.d/20-keyboard.conf with something like this:

Section "InputClass"
        Identifier "keyboard"
        MatchIsKeyboard "yes"
        Option "XkbLayout" "uk"
        Option "XkbVariant" "nodeadkeys"
EndSection

See https://wiki.archlinux.org/index.php/Be … ptional.29

Edit: argh, to late again...

Last edited by null (2011-11-15 18:26:13)

Offline

#4 2011-11-15 19:14:32

Ecky
Member
Registered: 2011-09-23
Posts: 37

Re: [Solved] Cannot get Arch to use UK keyboard

Thanks for the replies there guys, unfortunately neither method worked ... and you're gonna love this ...

Thinking along the lines of it loading en_us whatever I'm trying I decided to see what would happen if I renamed all the en_us stuff I could find so that xorg/kde couldn't find them.  Then I restarted the machine and logged into KDE, opened up System Settings > Locale at which point it complained at mee that it couldn't find the US language, promising stuff I thought to myself, looked into the Languages tab and British English was indeed the only entry there

Thinking I'd outsmarted it I fired up kwrite and proceeding to type .... still with a US keyboard!

The same US keyboard layout that kde can't find, this is why I love computers smile

Have to pop out for an hour or two, work calls, will wrestle with it some more when I get back


Mainboard:  Gigabyte 880GMA-UD2H  -  Processor:  Amd Phenom X6 1090T  -  Memory:  8GB (2x4Gb) Corsair Vengeance 1600Mhz DDR3  -  Graphics:   XFX Ati Radeon HD 6870

Offline

#5 2011-11-15 19:19:43

gazj
Member
From: /home/gazj -> /uk/cambs
Registered: 2007-02-09
Posts: 681
Website

Re: [Solved] Cannot get Arch to use UK keyboard

Don't think you need this for keyboard, but it is worth a try.  It should rename Trash to something more English like wastebasket at least smile

gary@Lister ~ $ pacman -Ss kde en_GB
extra/kde-l10n-en_gb 4.7.3-1
    British English Localization for KDE

EDIT: The keyboard layout for Great Britain is "uk" in the cli and "gb" (not uk) in X just to make things more complicated.
Snippet from my Xorg file.

Section "InputClass"
    Identifier             "Keyboard Defaults"
    MatchIsKeyboard	   "yes"
    Option	           "XkbLayout" "gb"
EndSection

Last edited by gazj (2011-11-15 19:22:08)

Offline

#6 2011-11-15 19:38:20

b4data
Member
Registered: 2010-12-14
Posts: 141

Re: [Solved] Cannot get Arch to use UK keyboard

perbh wrote:

Alternatively, you could use the 'setxkbmap' command

OP, did you try this?

This is what works for me, just add to your .xinitrc, or throw it in a script and configure kde to execute it on startup:

setxkbmap gb

Offline

#7 2011-11-15 20:50:39

null
Member
Registered: 2009-05-06
Posts: 398

Re: [Solved] Cannot get Arch to use UK keyboard

gazj wrote:

t for Great Britain is "uk" in the cli and "gb" (not uk) in X just to make things more complicated.
Snippet from my Xorg file.

Section "InputClass"
    Identifier             "Keyboard Defaults"
    MatchIsKeyboard	   "yes"
    Option	           "XkbLayout" "gb"
EndSection

Haha, sorry @Ecky for the false information. I guess perbh and I just guessed wrong. Yeah, try again with gb big_smile

Offline

#8 2011-11-15 21:21:28

Ecky
Member
Registered: 2011-09-23
Posts: 37

Re: [Solved] Cannot get Arch to use UK keyboard

Yay it's working!

What I did in the end was add this line:  Option "XkbLayout" "gb"

To this section of /etc/X11/xorg.conf.d/10-evdev.conf:

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

So it now looks like this:

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

So kudos to gazj for spotting that error, cheers smile

And yeah that's the way to treat a poor n00b null ... send me up the garden path and then laugh why don't ya ;P  We got there in the end's what counts, and I've seen quite a lot of posts regarding locale issues whilst searching on this so maybe it'll also serve to help someone else

With regards to the .xinitrc way doesn't that work on a per-user basis rather than globally?  No other language is ever likely to get used on this particular machine so a global setting makes more sense in this case


Mainboard:  Gigabyte 880GMA-UD2H  -  Processor:  Amd Phenom X6 1090T  -  Memory:  8GB (2x4Gb) Corsair Vengeance 1600Mhz DDR3  -  Graphics:   XFX Ati Radeon HD 6870

Offline

#9 2011-11-15 23:52:54

Ecky
Member
Registered: 2011-09-23
Posts: 37

Re: [Solved] Cannot get Arch to use UK keyboard

Marked this up as solved, thanks for the help guys, much appreciated smile


Mainboard:  Gigabyte 880GMA-UD2H  -  Processor:  Amd Phenom X6 1090T  -  Memory:  8GB (2x4Gb) Corsair Vengeance 1600Mhz DDR3  -  Graphics:   XFX Ati Radeon HD 6870

Offline

#10 2011-11-16 08:19:12

b4data
Member
Registered: 2010-12-14
Posts: 141

Re: [Solved] Cannot get Arch to use UK keyboard

Ecky wrote:

With regards to the .xinitrc way doesn't that work on a per-user basis rather than globally?

Yes it does. Changing the keyboard layout via kde system settings (like you were trying to do in your original first post) also does, that's why I thought it was an acceptable solution to recommend smile Glad you found a solution that works for you.

Offline

Board footer

Powered by FluxBB