You are not logged in.

#1 2009-03-08 14:58:55

Nazgulled
Member
Registered: 2009-03-08
Posts: 102

[SOLVED] Can't configure correct keymap for my language

Hi,

I come from Gentoo but I was sick of it and decided to try Arch smile I'm having a few little issues as with any other linux distro, this is the one that it's bothering me the most for now...

I'm from Portugal and I need to type keys like "á, è, ç, í, ê, õ, ã" and the "€" symbol. I'm trying to make this work in the console and on Xorg but without any DE/WM for now... It is working fine on Xorg but not on the console. For instance:

I type:
é õ ç € à ê

The output is:
´e ~o ç € `a ^e

So, the "ç" and "€" are working fine, but not the others characters...

This is my current rc.conf file:

LOCALE="en_US.utf8"
TIMEZONE="Europe/Lisbon"
KEYMAP="pt-latin9"
CONSOLEFONT="lat9w-16"
CONSOLEMAP="8859-15"

I've also tried LOCALE="pt_PT.utf8" but the result was the same...

Any suggestions?

Last edited by Nazgulled (2009-03-16 23:51:17)

Offline

#2 2009-03-09 05:20:53

Mektub
Member
From: Lisbon /Portugal
Registered: 2008-01-02
Posts: 647

Re: [SOLVED] Can't configure correct keymap for my language

After trying several combinations this works for me at the tty level (no X):

LOCALE="en_US.utf8"
TIMEZONE="Europe/Lisbon"
KEYMAP="pt-latin1"
CONSOLEFONT="LatArCyrHeb-16"
CONSOLEMAP=

Mektub


Follow me on twitter: https://twitter.com/johnbina

Offline

#3 2009-03-09 11:06:56

Nazgulled
Member
Registered: 2009-03-08
Posts: 102

Re: [SOLVED] Can't configure correct keymap for my language

The euro symbol doesn't work with that...

I guess the trick for accented chars is to have KEYMAP=pt-latin1 and the CONSOLEFONT depends. I'm using "lat9w-16" for CONSOLEFONT, I think it makes more sense than "LatArCyrHeb-16". Either way, the euro is not working, the other chars are...

Better than nothing but I would still like to have the euro symbol working... And it's not working in GNOME and I need that too sad

Thanks by the way.

Last edited by Nazgulled (2009-03-09 11:25:31)

Offline

#4 2009-03-09 11:25:31

toffyrn
Member
Registered: 2008-10-07
Posts: 221

Re: [SOLVED] Can't configure correct keymap for my language

Your local shoud be "en_US.UTF-8". (Uppercase...)

I know that this can raise issues with chars in different apps, but i dont know if that will affect your console.

Offline

#5 2009-03-09 11:31:27

Nazgulled
Member
Registered: 2009-03-08
Posts: 102

Re: [SOLVED] Can't configure correct keymap for my language

With an hyphen between "UTF" and "8"? When I do "locale -a" I only see "en_US.utf8", without an hyphen and "UTF" in lowercase...

Didn't solve my problem though sad Thanks anyway.

Offline

#6 2009-03-10 13:56:44

Mektub
Member
From: Lisbon /Portugal
Registered: 2008-01-02
Posts: 647

Re: [SOLVED] Can't configure correct keymap for my language

I did some experimenting on a TTY console and now I have the following:

LOCALE="en_US.utf8"
TIMEZONE="Portugal"
KEYMAP="pt-latin1"
CONSOLEFONT="lat0-16"
CONSOLEMAP=

After booting, on a Virtual Console I type:

loadkeys euro.map

Then the Euro symbol works by typing "Alt-E".

Note that it is the LEFT Alt, not the right Alt-GR.

The same results are achieved with:

cd /tmp
cp /usr/share/kbd/keymaps/i386/qwerty/pt-latin1.map.gz .
gunzip pt-latin1.map.gz
vi pt-latin1.map

Insert line:
include "euro.map"
After line:
include "linux-with-alt-and-altgr"

Then:

loadkeys /tmp/pt-latin1.map

Is the pt-latin1.map.gz not complete ?

Mektub


Follow me on twitter: https://twitter.com/johnbina

Offline

#7 2009-03-10 14:10:46

Ertu
Member
Registered: 2009-03-10
Posts: 21

Re: [SOLVED] Can't configure correct keymap for my language

Hello! I have a similar problem, but my keymap is only problematic in gnome-terminal. It works fine in xterm, firefox, etc. (euro sign doesn't work in gvim though).

My settings:

/etc/rc.conf

LOCALE="pt_PT.utf8"
HARDWARECLOCK="local"
USEDIRECTISA="no"
TIMEZONE="Europe/Lisbon"
KEYMAP="pt-latin9"
CONSOLEFONT=                  #aren't these for the framebuffer only?
CONSOLEMAP=                   #
USECOLOR="yes"

Then in locale.gen I have all the pt_PT lines uncommented. Finally, as per wiki instructions, I ran:

export LANG=en_EN.utf8

That sets the system language to english, if you prefer.

/etc/X11/xorg.conf

Section "InputDevice"
    Identifier  "Keyboard0"
    Driver      "keyboard"
    Option      "CoreKeyboard"
    Option "XkbRules" "xorg"
    Option "XkbModel" "pc105"
    Option "XkbLayout" "pt"
    Option "XkbVariant" ""
EndSection

Hope this helps tongue.

Offline

#8 2009-03-10 19:31:40

Nazgulled
Member
Registered: 2009-03-08
Posts: 102

Re: [SOLVED] Can't configure correct keymap for my language

Mektub wrote:

After booting, on a Virtual Console I type:

loadkeys euro.map

Then the Euro symbol works by typing "Alt-E".

Note that it is the LEFT Alt, not the right Alt-GR.

It's a start, but that's not right, the shortcut should be "AltGr+E", no "Alt+E"...

Anyway, I fixed my problem in Xorg/GNOME. The problem was on Xorg 1.5 hotplugging thing. Read more about it in the wiki:
http://wiki.archlinux.org/index.php/Xor … figuration

What it solved for me was to change the "input.xkb.layout" to "pt" in "/usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi". This made all Portuguese chars working including the Euro symbol, both in GNOME console, Gedit, xterm, etc... (don't use gvim, so can't help there)

My only problem now lies on the TTY (virtual consoles / framebuffer) that it's missing the euro symbol by typing "AtlGr+E", any more ideas?

Offline

#9 2009-03-16 02:35:37

Nazgulled
Member
Registered: 2009-03-08
Posts: 102

Re: [SOLVED] Can't configure correct keymap for my language

So, nobody has any idea how to use the Euro symbol in the console using "AltGr+E"?

Offline

#10 2009-03-16 23:50:43

Nazgulled
Member
Registered: 2009-03-08
Posts: 102

Re: [SOLVED] Can't configure correct keymap for my language

Solved it... The trick is to load the "euro.map" as pointed by Mektub and both "pt-latin1" and "pt-latin9" must be loaded, the "9" for the euro symbol to work with AltGr+E (with "1" will only work with Alt+E) and the "1" for all other chars to work, like á, õ, ê, etc... They won't work with just "9" enabled.

My current rc.conf is like this now:

LOCALE="en_US.utf8"
TIMEZONE="Europe/Lisbon"
KEYMAP="pt-latin1 pt-latin9 euro"
CONSOLEFONT=
CONSOLEMAP=

I guess there's no need, for me at least, to have CONSOLEFONT and/or CONSOLEMAP defined...

I don't know if this is the proper way to solve this, but it's working...

Last edited by Nazgulled (2009-03-16 23:57:26)

Offline

Board footer

Powered by FluxBB