Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Tip/Mini-HowTo] Accented Characters (such as áèíÓÙ and ñ)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
codergeek42
Bodhisattva
Bodhisattva


Joined: 05 Apr 2004
Posts: 5142
Location: Anaheim, CA (USA)

PostPosted: Wed Nov 17, 2004 6:14 am    Post subject: [Tip/Mini-HowTo] Accented Characters (such as áèíÓÙ and Reply with quote

(Last Updated: 24 November 2004, 07:46)
I forgot to mention that this is for X applications only. In order to use the same keymapping in a console (i.e., not in X), change the KEYMAP= line in your /etc/rc.conf file to read
Code:
KEYMAP="us-acentos"
(Thanks to swimmer for this tip.)

First of all, I sometimes need to type a lot of accented characters for school (Spanish class). I always liked the fact that on a lot of Windows applications, I could press <CTRL>+<'> then the desired character (such as pressing <CTRL>+<'> then e to get an é). After having to do many many "Insert --> Special Character" in OO.o, I decided that there had to be a way to do something similar in Linux. Well, after searching the forums, I found a nifty little trick.

The only thing one must do (as far as I can tell) is set your Keyboard Layout to "us_intl" in your xorg.conf:
Code:
Section "InputDevice"
   [...]
   Option      "XkbLayout" "us_intl"
   [...]
EndSection
Then you can insert accented and umlauted characters easily by pressing ' then the desired key. (You must type ' then a space for a single apostrophe.) For example, you can type lots of stuff in Spanish, such as
Quote:
No me gustó ésta portque era muy picante. Pero él dijo que tratará de traerme comida sin chileños la próxima vez.
Or you can also you backtick for letters such as àÈÌòù and the tilde for an ñ character.

You should be able to use these characters in every well-behaved X application. (I've tested this with Firefox, xterm, OO.o, Gaim, Thunderbird, and Rox-Filer.) Hope this helps someone!

(Thanks to perseguidor for the advice.)
_________________
~~ Peter: Programmer, Mathematician, STEM & Free Software Advocate, Enlightened Agent, Transhumanist, Fedora contributor
Who am I? :: EFF & FSF


Last edited by codergeek42 on Wed Nov 24, 2004 3:47 pm; edited 2 times in total
Back to top
View user's profile Send private message
yogipsu
Tux's lil' helper
Tux's lil' helper


Joined: 30 Aug 2003
Posts: 98

PostPosted: Wed Nov 17, 2004 7:46 pm    Post subject: Reply with quote

Something that may be a little easier on the hands:

In your xorg.conf, add the following under the keyboard section of InputDevice:

Code:
Option "XkbSymbols" "compose:ralt"


("ralt" can be changed to other keys, too; I just find that the right alt key is convenient, since I can hit it with my right thumb...)

Then: ralt + ', then e, for é. It seems to work the same as in Microsoft systems, such that ralt + [ shift + 6 ] == ralt + ^ will also work.

HTH.
Back to top
View user's profile Send private message
codergeek42
Bodhisattva
Bodhisattva


Joined: 05 Apr 2004
Posts: 5142
Location: Anaheim, CA (USA)

PostPosted: Wed Nov 17, 2004 8:02 pm    Post subject: Reply with quote

yogipsu wrote:
Something that may be a little easier on the hands:

In your xorg.conf, add the following under the keyboard section of InputDevice:

Code:
Option "XkbSymbols" "compose:ralt"


("ralt" can be changed to other keys, too; I just find that the right alt key is convenient, since I can hit it with my right thumb...)

Then: ralt + ', then e, for é. It seems to work the same as in Microsoft systems, such that ralt + [ shift + 6 ] == ralt + ^ will also work.

HTH.
8O 8) NICE!
_________________
~~ Peter: Programmer, Mathematician, STEM & Free Software Advocate, Enlightened Agent, Transhumanist, Fedora contributor
Who am I? :: EFF & FSF
Back to top
View user's profile Send private message
-Rick-
Tux's lil' helper
Tux's lil' helper


Joined: 29 Aug 2004
Posts: 77
Location: Holland

PostPosted: Wed Nov 17, 2004 8:06 pm    Post subject: Reply with quote

yogipsu wrote:
Something that may be a little easier on the hands:

In your xorg.conf, add the following under the keyboard section of InputDevice:

Code:
Option "XkbSymbols" "compose:ralt"


("ralt" can be changed to other keys, too; I just find that the right alt key is convenient, since I can hit it with my right thumb...)

Then: ralt + ', then e, for é. It seems to work the same as in Microsoft systems, such that ralt + [ shift + 6 ] == ralt + ^ will also work.

HTH.


If I use that on my laptop xorg restarts itself when I press a key :-\

Method by codergeek works though 8)
Back to top
View user's profile Send private message
RedSonja
n00b
n00b


Joined: 13 Aug 2004
Posts: 21

PostPosted: Wed Nov 17, 2004 8:19 pm    Post subject: Reply with quote

It's probably very difficult but, is there a way to use alt+keypad to enter characters like in Windows? I have a mom winning all to often that Linux is too different for her to use... :x
Back to top
View user's profile Send private message
codergeek42
Bodhisattva
Bodhisattva


Joined: 05 Apr 2004
Posts: 5142
Location: Anaheim, CA (USA)

PostPosted: Wed Nov 17, 2004 9:59 pm    Post subject: Reply with quote

RedSonja wrote:
It's probably very difficult but, is there a way to use alt+keypad to enter characters like in Windows?
Not that I know of :?
_________________
~~ Peter: Programmer, Mathematician, STEM & Free Software Advocate, Enlightened Agent, Transhumanist, Fedora contributor
Who am I? :: EFF & FSF
Back to top
View user's profile Send private message
benguru
Tux's lil' helper
Tux's lil' helper


Joined: 19 Feb 2004
Posts: 125

PostPosted: Thu Nov 18, 2004 3:01 am    Post subject: Reply with quote

Quote:
If I use that on my laptop xorg restarts itself when I press a key :-\

Me too, on my desktop... nice feature though, otherwise. Thanks :)
Back to top
View user's profile Send private message
psycho_seba
n00b
n00b


Joined: 17 Dec 2003
Posts: 64
Location: Argentina

PostPosted: Thu Nov 18, 2004 11:30 pm    Post subject: Reply with quote

yogipsu wrote:
In your xorg.conf, add the following under the keyboard section of InputDevice:

Code:
Option "XkbSymbols" "compose:ralt"


Great! I am using a dvorak layout, hence using an us_intl layout was not an option. Besides, I share the computer with my office mate (regular layout), so instead of modifying xorg.conf I execute
Code:
setxkbmap dvorak -option XkbSymbols=compose:ralt

automatically on XFCE4 startup. Working great.

Seba
Back to top
View user's profile Send private message
MighMoS
Guru
Guru


Joined: 24 Apr 2003
Posts: 416
Location: @ ~

PostPosted: Sat Nov 20, 2004 2:54 pm    Post subject: Reply with quote

RedSonja wrote:
It's probably very difficult but, is there a way to use alt+keypad to enter characters like in Windows? I have a mom winning all to often that Linux is too different for her to use... :x

Yes, there is a way. But they key codes are different, b/c AFAIK windows uses 255 char map, while Linux has that 65536 thing going for it. So you will have to learn new key codes. But if you press ctrl+shift+[code] it will act as it did in windows. You can find the codes in gucharmap at the buttom when you select a char, but I don't know of a KDE equivilent. For example è = 00E8 (you can drop the leading zeros).
_________________
jabber: MighMoS@jabber.org

localhost # export HOME=`which heart`


Last edited by MighMoS on Mon Nov 22, 2004 8:07 pm; edited 1 time in total
Back to top
View user's profile Send private message
RedSonja
n00b
n00b


Joined: 13 Aug 2004
Posts: 21

PostPosted: Mon Nov 22, 2004 7:36 pm    Post subject: Reply with quote

MighMoS wrote:
RedSonja wrote:
It's probably very difficult but, is there a way to use alt+keypad to enter characters like in Windows? I have a mom winning all to often that Linux is too different for her to use... :x

Yes, there is a way. But they key codes are different, b/c AFAIK windows uses 255 char map, while Linux has that 65536 thing going for it. So you will have to learn new key codes. But if you press ctrl+shift+[code] it will act as it did in windows. You can find the codes in gnuchar map at the buttom when you select a char, but I don't know of a KDE equivilent. For example è = 00E8 (you can drop the leading zeros).

Thnx for the info, I didn't know about that. I don't know about what gnuchar you're talking but I found a char-list in OO.o which will do fine.
The option of yogipsu makes X restart every time I press a key just like for some other people here. I guess it's because i have kbd as the driver?

Quote:

Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
#Option "XkbSymbols" "compose:ralt"
EndSection
Back to top
View user's profile Send private message
MighMoS
Guru
Guru


Joined: 24 Apr 2003
Posts: 416
Location: @ ~

PostPosted: Mon Nov 22, 2004 8:08 pm    Post subject: Reply with quote

The reason might be because I misspelled it. The program name is actually "gucharmap", and it comes by default w/ GNOME. I've also updated my original post.
_________________
jabber: MighMoS@jabber.org

localhost # export HOME=`which heart`
Back to top
View user's profile Send private message
swimmer
Veteran
Veteran


Joined: 15 Jul 2002
Posts: 1314
Location: Netherlands

PostPosted: Wed Nov 24, 2004 2:36 pm    Post subject: Re: [Tip/Mini-HowTo] Accented Characters (such as áèíÓÙ Reply with quote

codergeek42 wrote:
EDIT: I forgot to mention that this is for X applications only. I'm still trying to figure out how to do this in the tty[1-6] terminals.


If you want the same in the tty terminals edit the following line in /etc/rc.conf
Code:
KEYMAP="us-acentos"

HTH
swimmer
Back to top
View user's profile Send private message
codergeek42
Bodhisattva
Bodhisattva


Joined: 05 Apr 2004
Posts: 5142
Location: Anaheim, CA (USA)

PostPosted: Wed Nov 24, 2004 3:46 pm    Post subject: Re: [Tip/Mini-HowTo] Accented Characters (such as áèíÓÙ Reply with quote

swimmer wrote:
codergeek42 wrote:
EDIT: I forgot to mention that this is for X applications only. I'm still trying to figure out how to do this in the tty[1-6] terminals.


If you want the same in the tty terminals edit the following line in /etc/rc.conf
Code:
KEYMAP="us-acentos"

HTH
swimmer
Bingo! Thanks, swimmer!
_________________
~~ Peter: Programmer, Mathematician, STEM & Free Software Advocate, Enlightened Agent, Transhumanist, Fedora contributor
Who am I? :: EFF & FSF
Back to top
View user's profile Send private message
swimmer
Veteran
Veteran


Joined: 15 Jul 2002
Posts: 1314
Location: Netherlands

PostPosted: Wed Nov 24, 2004 4:35 pm    Post subject: Re: [Tip/Mini-HowTo] Accented Characters (such as áèíÓÙ Reply with quote

codergeek42 wrote:
Bingo! Thanks, swimmer!

No problem ;-)
swimmer
Back to top
View user's profile Send private message
dberkholz
Retired Dev
Retired Dev


Joined: 18 Mar 2003
Posts: 1008
Location: Minneapolis, MN, USA

PostPosted: Thu Feb 03, 2005 6:23 am    Post subject: Re: [Tip/Mini-HowTo] Accented Characters (such as ï¿½ï¿ Reply with quote

codergeek42 wrote:
The only thing one must do (as far as I can tell) is set your Keyboard Layout to "us_intl" in your xorg.conf:
Code:
Section "InputDevice"
   [...]
   Option      "XkbLayout" "us_intl"
   [...]
EndSection

I use en_US instead.

The difference, taken from /usr/lib/X11/xkb/rules/xorg.lst:
en_US U.S. English w/ ISO9995-3
us_intl U.S. English w/ deadkeys

This post has a little more info.
Back to top
View user's profile Send private message
dayul
Apprentice
Apprentice


Joined: 02 Jun 2004
Posts: 180
Location: Blackpool, England

PostPosted: Thu Feb 03, 2005 10:54 am    Post subject: Reply with quote

Hi, is there a similar gb_intl option that would let me use the gb keyboard with the accents? or should i just go for the compose:ralt option?

thanks,

Dale
Back to top
View user's profile Send private message
dberkholz
Retired Dev
Retired Dev


Joined: 18 Mar 2003
Posts: 1008
Location: Minneapolis, MN, USA

PostPosted: Thu Feb 03, 2005 8:16 pm    Post subject: Reply with quote

dayul wrote:
Hi, is there a similar gb_intl option that would let me use the gb keyboard with the accents? or should i just go for the compose:ralt option?

thanks,

Dale


The gb keymap pretty much has it by default. If you look at the file /usr/lib/X11/xkb/symbols/gb, you'll see it's already nearly identical to en_US, as the comments indicate. Try stuff like ralt+semicolon, a/e/i/o/u.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum