You are not logged in.

#1 2009-11-23 08:27:29

iopo
Member
Registered: 2009-10-26
Posts: 31

[Solved] Accents on US keyboards

Hello everyone,

I have already solved this for my laptop, so I post the solution to help someone else.
My laptop is a Dell Inspiron E1505, with English-us keyboard. And my main language is Spanish, so I normally use accents like áéíóú, and ñ.

The solution suggested on the wiki was not helpful for me:
http://wiki.archlinux.org/index.php/Acc … _keyboards

You may consider adding this other solution to the wiki.

I have found that the us xkb layout already has an International variant, with all the accents, so, to enable the accents on a us layout you only have to edit /etc/hal/fdi/policy/10-keymap.fdi and correct the following two lines as follows:

      <merge key="input.xkb.layout" type="string">us</merge>
      <merge key="input.xkb.variant" type="string">altgr-intl</merge>

Save, exit, reboot.
To use the accents, just press the right Alt + the key you want
Example: Alt+e = é
That way you get a lot of special characters (¿µñb®©œæøœïðßáöóíúüþëéåä, etc.)

That's it.
There's no need to modify xorg.conf or install extra stuff/config files or scripts to modify the default layout.
With this solution works perfect.

***************************
Updated - June 30, 2010

The HAL solution doesn't work any more with Xorg 1.8, so I solved it by adding the keyboard layout and variant to xorg.conf:

Section "InputClass"
    Identifier             "Keyboard Defaults"
    MatchIsKeyboard        "yes"
    Option                 "XkbLayout" "us"
    Option                 "XkbVariant" "intl"
EndSection

Use "intl" variant to get á wit 'a, or "altgr-intl" to get á with AltGr+a

Last edited by iopo (2010-06-30 21:39:15)

Offline

#2 2009-11-23 15:10:45

sokuban
Member
Registered: 2006-11-11
Posts: 412

Re: [Solved] Accents on US keyboards

What is the problem with the solution suggested in the wiki? Does it not work?

It seems pretty good because it allows you to make your own keyboard layout, which I got to get around to doing one day. (I currently use the Compose Key, but ever since about a year ago or so it won't make an ō or ā for me instead spitting out º and ª - and unfortunately, it doesn't seem like you can edit the Compose Key sequences, which really annoys me.)

Offline

#3 2009-11-23 18:21:07

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: [Solved] Accents on US keyboards

Are you sure /etc/hal/fdi/policy/ is the correct path? 
I find nothing in that directory hmm

R.

Offline

#4 2009-11-23 18:42:04

kazuo
Member
From: São Paulo/Brazil
Registered: 2008-03-18
Posts: 413
Website

Re: [Solved] Accents on US keyboards

I use the hal solution and I think this is more clean then the xmodmap solution. I use intl in place of altgr-intl so for é you type 'e. Xmodmap solution is good for customization but for only using accents I think that hal solution is more easy and fast to implement and understand.

But remember you need a initial 10-keymap.fdi in /etc as the default is a non-existent file. You need to copy the file from /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi

@ralvez: the directory is correct, you need to create it and copy the file from /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi

Offline

#5 2009-11-23 19:00:20

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: [Solved] Accents on US keyboards

@kazuo,

thanks ... I'll give it a try.

R

Offline

#6 2009-11-26 02:56:06

iopo
Member
Registered: 2009-10-26
Posts: 31

Re: [Solved] Accents on US keyboards

Hello all,

Excuse me for the delay,
For me, the problem with the Xmodmap suggested in the wiki was:
1- XKeyCaps program was buggy (didn't allowed me to select a keyboard)
2- The Example xmodmap file doesn't have the same keycodes of my keyoboard, so the solution was to manually create my own keyboard layout.

If I was going to create my own keyboard layout, I think that the most clear/clean solution is to create a custom layout for HAL. I was going to do that, taking the "us" layout as base, and that's how I found that the us layout already hast the international variant (and there are a few other variants, you can search the one that better fit your needs). The default International variant was good for me, so there was no need to create a new layout smile

I think that the Xmodmap solution is more like a patch, and it may create some problem or confusion in a future after several system updates...

Maybe some Arch expert can give us a better explanation about both solutions.

Regards.

Offline

#7 2009-11-26 03:24:56

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,694
Website

Re: [Solved] Accents on US keyboards

I tried as indicated but that did not work for me.
I tested in OOO and Thunderbird ... no joy.

R.

Offline

#8 2009-11-26 06:25:59

iopo
Member
Registered: 2009-10-26
Posts: 31

Re: [Solved] Accents on US keyboards

@ralvez,

Have you created the dir and file as @kazuo suggested?
Try this:
1-

# cp /usr/share/hal/fdi/policy/10osvendor/10-keymap.fdi /etc/hal/fdi/policy/

2- Edit edit /etc/hal/fdi/policy/10-keymap.fdi to set the us layout, with international variant

      <merge key="input.xkb.layout" type="string">us</merge>
      <merge key="input.xkb.variant" type="string">altgr-intl</merge>

3- Restart your system
If it doesn't work, try:

# setxkbmap us

And test it in a simple text editor like mousepad or notepad to make sure it's working on your system. You can even test it on a terminal emulator.

Offline

#9 2010-06-30 21:34:58

iopo
Member
Registered: 2009-10-26
Posts: 31

Re: [Solved] Accents on US keyboards

Updated - June 30, 2010

The HAL solution doesn't work any more with Xorg 1.8, so I solved it by adding the keyboard layout and variant to xorg.conf:

Section "InputClass"
    Identifier             "Keyboard Defaults"
    MatchIsKeyboard        "yes"
    Option                 "XkbLayout" "us"
    Option                 "XkbVariant" "intl"
EndSection

Use "intl" variant to get á wit 'a, or "altgr-intl" to get á with AltGr+a

Last edited by iopo (2010-06-30 21:35:58)

Offline

#10 2010-09-17 20:20:49

RJQ
Member
From: Los Angeles
Registered: 2010-06-25
Posts: 70
Website

Re: [Solved] Accents on US keyboards

Great!!  perfect for lightweight WM/DE like openbox in which configurations are more tedious, ....because there is a huge difference between anos y años. big_smile Thanks for sharing.


Natural Spanish speaker person babbling English...
Natural Linux user babbling Archlinux...

Offline

Board footer

Powered by FluxBB