Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old January 2nd, 2007   #1
jem7v
Ubuntu Extra Shot
 
jem7v's Avatar
 
Join Date: Jul 2006
Location: Canada, eh?
Beans: 353
Ubuntu 9.10 Karmic Koala
Send a message via MSN to jem7v
Smile HOWTO: Special Characters made easier

This was written for Edgy, but it probably works in other releases too.

Back in Dapper Drake, you could press CTRL+SHIFT and then the unicode for special characters so you didn't have to copy and paste them from the Character palette every time you wanted to use them. This stopped working in Edgy, which greatly reduced my ability to type in Spanish. The Spanish keyboard layout doesn't contain any letters with accents except ñ, so it didn't help much.

Then I found the magic solution! A handy little tool called the COMPOSE KEY.

Go to System -> Preferences -> Keyboard, then go to the Layout Options tab. There are several headings here, and the important one that says Compose Key Position. Choose a key you don't use for much, and set it as your Compose key! (I use my right WINDOWS key)

To use it, hold the Compose key down and then type in the characters you want to mash together. For example, you can make an ñ by typing <compose>+n+~, or è by typing <compose>+e+`, or ß by typing <compose>+s+s and voila your letters appear.



Maybe there was already a howto about this, or maybe lots of people already know this - but I looked for an answer to this problem for a long time and I didn't find one. I heard ABOUT compose keys in other operating systems (like OSX) but didn't figure it out until I was looking for a different keyboard setting. I hope at least Some people can find this helpful.
jem7v is offline   Reply With Quote
Old January 9th, 2007   #2
userundefine
Way Too Much Ubuntu
 
userundefine's Avatar
 
Join Date: Apr 2006
My beans are hidden!
Ubuntu 7.10 Gutsy Gibbon
Re: HOWTO: Special Characters made easier

Hé, great hôwtò ! I'm on a US English keyboard and frequently have to type in French, so this makes it SO much easier. I had to find this thread with the search tool, so I hope more can see this so I'm bumping it to the top!
userundefine is offline   Reply With Quote
Old January 9th, 2007   #3
stalefries
Ubuntu Extra Shot
 
Join Date: Nov 2005
Location: Where do I live
Beans: 330
Ubuntu 6.10 Edgy
Re: HOWTO: Special Characters made easier

One trick that I really like is the Character Palette applet. It's not that good for languages with accent characters, but it is good for keeping around special characters that you use sometimes, like ツ. You can define multiple sets of special characters, it comes with several built-in. I keep it in a drawer on my bottom panel.
stalefries is offline   Reply With Quote
Old January 12th, 2007   #4
Buck2348
Way Too Much Ubuntu
 
Buck2348's Avatar
 
Join Date: Nov 2006
Location: Peru, Indiana
Beans: 285
Ubuntu 6.10 Edgy
Re: HOWTO: Special Characters made easier

This is a helpful post, Jem7v. I stumbled onto the compose key a few weeks ago, probably while reading the Forums. One of the best features of Linux is that almost anything you do with it can be customized. Same for using the Compose Key. For some reason Edgy isn't set up as well as it might be for using it. For example, you can't make fractions like ½ with it. To fix that you need to add a line to /etc/environment:
Code:
gksudo gedit /etc/environment
add the following:
Code:
export GTK_IM_MODULE=xim
now copy a file to your home folder:
Code:
cp /usr/share/X11/locale/en_US.UTF-8/Compose ~/.XCompose
This will give you a more complete character set. Also you can edit that file. Suppose for example that your keyboard doesn't have a tilde (~). You can change the lines that require entering a tilde so that a simple "t" (or whatever you like) wil work. Just don't use a key combination that's already in use somewhere else. You can check that by entering the combination before you change anything and see if you get any character output. Also you can browse through this file to find the key combination for the character you want if it isn't fairly obvious.

I learned this from this thread: http://ubuntuforums.org/showthread.php?t=209115

Buck

Last edited by Buck2348; January 13th, 2007 at 01:42 PM..
Buck2348 is offline   Reply With Quote
Old January 15th, 2007   #5
icefaerie
5 Cups of Ubuntu
 
Join Date: May 2006
Beans: 41
Ubuntu 6.10 Edgy
Re: HOWTO: Special Characters made easier

WOW! Thank you so much for posting this! This was one of the few things keeping me booting into Windows, because typing essays in Spanish is a pain without the quick input method for special charactes.
icefaerie is offline   Reply With Quote
Old January 23rd, 2007   #6
userundefine
Way Too Much Ubuntu
 
userundefine's Avatar
 
Join Date: Apr 2006
My beans are hidden!
Ubuntu 7.10 Gutsy Gibbon
Re: HOWTO: Special Characters made easier

I've been using KDE lately and was missing my Compose Key. So I found out how to do it in KDE:

Go to Control Center > Regional & Accessibility > Keyboard Layout.

In Xkb Options (simply "Options" for older KDE versions), check "Enable xkb options", scroll down to "Compose Key Position", choose which key(s) you want to use to make your special characters, then Apply.

Ànd áway yoû gœ!
userundefine is offline   Reply With Quote
Old March 7th, 2007   #7
ricardisimo
Dark Roasted Ubuntu
 
ricardisimo's Avatar
 
Join Date: Aug 2006
Location: California
Beans: 1,023
Ubuntu 9.10 Karmic Koala
Re: HOWTO: Special Characters made easier

I'm in the same position, where my primary language is English, but I write to my family extensively in Spanish. Easily the best compromise has been choosing US International with dead keys as my default keyboard layout. Very simple <ALT> modifier options; <ALT>+n is ñ, <ALT>+a is á, and so on... áéíóúñ¡¿€ with quite a few others that you'll rarely if ever use.

The dead keys are a bit of a problem, more so in Ubuntu than in Windows. The main dead keys are ", ', `, and ~, all of which require you to remember to hit <SPACE> if you actually want them as is, rather than as a modifier. In Windows, it's a bit more intuitive, where you can type an ' and then an s and get 's, rather than ś as in Ubuntu. I believe Windows only allows the dead keys to modify the vowels, which makes more sense for any US-family layout. Ubuntu modifies stuff you don't want, or - if there is no character associated with the keycode - drops both of your keys. Typing "I'd" requires you to hit I+'+<SPACE>+d, or else you just get the "I". Windows has similar problems with the double quotes.

I'm wondering what would be easier: adding the <ALT> combinations to US English, or removing the dead keys from US International. There is a "Clear" command with xmodmap that seems to do something like what I'm seeking, but I'm uncertain of the syntax I need to use, and being still noobish I'm wary of losing keyboard functionality in any way and not knowing how to restore defaults. I'd appreciate any suggestions. thanks.
ricardisimo is offline   Reply With Quote
Old March 12th, 2007   #8
dhallar
First Cup of Ubuntu
 
Join Date: Jul 2006
Beans: 8
Re: HOWTO: Special Characters made easier

I've chosen the right Ctrl key as my compose key. Now: How do I set the key combinations that I want? [I need a Spanish set. I'm using Edgy.]

Last edited by dhallar; March 12th, 2007 at 03:21 PM..
dhallar is offline   Reply With Quote
Old May 10th, 2007   #9
Flavian
Gee! These Aren't Roasted!
 
Flavian's Avatar
 
Join Date: Jun 2006
Location: Of der Ring - Austria
My beans are hidden!
Ubuntu 9.04 Jaunty Jackalope
Re: HOWTO: Special Characters made easier

Hi guys. Maybe someone of YOU can help me I am really desperate, because I can't get this to work. Since I am an Austrian and we speak German here I got the following problem. Some characters would look weird.
I've kinda found out that with unicode they don't.
With Evolution i've got the following problem that I already postet in another thread but never got an answer
It can be found here:
http://ubuntuforums.org/showpost.php...1&postcount=11

Also with attachments that I send in Evolution it sometimes does not treat the filenames right. and places like ? in place of the Üs

Maybe someone can help me with that.
Thanks in advance.
Florian
Flavian is offline   Reply With Quote
Old May 14th, 2007   #10
cosmolee
Just Give Me the Beans!
 
Join Date: Jun 2005
Beans: 57
vi problems with Special Characters

Setting the Compose key is a great solution for inputting accented characters!

However, I've discovered a vexing problem when displaying such text with `vi`. Take the following line I created using the Compose key (note: there are tabs between the words, not spaces):

poder uede emos éis ueden riXX


Starting with the cursor at the beginning of the line, one moves from word to word with the `w` command. Hitting `w` three times, thus moves the cursor to the beginning of the word "éis", However, once more, then the cursor moves to the letter "i" instead of the next word "ueden". Hitting `w` again, the cursor moves to the letter "s" instead of the word "ueden". Hitting `w` once again, the cursor moves to the next word, but instead of positioning at the first letter "u" of "ueden", it positions at the second letter "e" of "ueden". ie, the cursor positioning gets all screwed up visually. `vi` thinks it's at the beginning of the word "ueden", but the display shows it at the letter "e". Hitting `w` again, the cursor then moves to the next word "riXX", but is positioned at the second letter "i" instead of the first letter "r".

Any idea what gives??

TIA.

Last edited by cosmolee; May 18th, 2007 at 02:38 PM..
cosmolee is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:30 AM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry