LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-28-2007, 03:20 PM   #1
pwabrahams
Member
 
Registered: Nov 2005
Location: Deerfield MA
Distribution: OpenSuSE, Kubuntu
Posts: 293

Rep: Reputation: 41
Typing special characters such as Æ and ö


How do you type special characters in Linux? The method in Windows is to hold down the Alt key and then type the 4-digit code, e.g., Alt+0246 for ö. But that doesn't seem to work, at least not when I try it on a command line or in an editor (under KDE at least) on my laptop.

Well, how did I type the ones in this very message, you may ask? I copied and pasted them from a code chart, but that's a very awkward way to do it. There must be something better, but I don't know what it is and I don't even know what topic in the various helps would have the information.

Last edited by pwabrahams; 10-28-2007 at 03:21 PM. Reason: clarity
 
Old 10-28-2007, 04:10 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
If you are using OpenOffice.org Writer, from the menu Insert - Special Character. Pick the character from the dialogue box that pops up.

If you are using vim, add this to your .vimrc
:set digraph

When writing in vim, to use the digraph feature, from the command prompt enter ':digraph' without quotes. You will be presented with a chart of digraph characters. They consist of two letter/character keys with a backspace between.

So, A <backspace> E would give the Æ. You can get more help from vim with the command :help digraph.

If there is a way to do the same in the bash shell, I haven't found it yet.

Last edited by bigrigdriver; 10-28-2007 at 04:12 PM.
 
Old 10-28-2007, 04:56 PM   #3
pwabrahams
Member
 
Registered: Nov 2005
Location: Deerfield MA
Distribution: OpenSuSE, Kubuntu
Posts: 293

Original Poster
Rep: Reputation: 41
I want to create filenames in Konqueror

I actually want to create filenames in Konqueror that are foreign-language titles of CD tracks. So I'm looking for a method that doesn't rely on particular programs. If Windows can do it with the Alt--xxxx method, then surely there ought to be a way to do the same thing in Linux as easily!
 
Old 10-28-2007, 05:16 PM   #4
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 78
Search (the fora and the web) for “Compose Key” (IMO more elegant than Alt+xxxx). For example, on my setup, to type Æ, type the following:
Code:
<Compose>,<Shift>+<a>,<Shift>+<e>
(where comma indicates press-and-release, and the plus-sign indicates press-and-hold until the next keypress)

As you can see the idea of the compose key is to compose complicated characters from simpler characters (so Æ is the combination of a capital A and a capital E). Likewise, ö is the composition of the straight double quotes " (on a US keyboard it’s <Shift>+<'>) with lowercase o. The compose key should work in plain X (i.e., wm-independent), but it might take some tweaking to work seamlessly with gtk apps and qt/kde apps. Additionally, once you get the Compose key working, it is trivial to add your own compositions for characters you may use but for which there is no predefined sequence.

If you want something more powerful than X’s compose key (technically part of the X Input Method), you might try a different input method (e.g., the Smart Common Input Method).
 
Old 10-28-2007, 05:33 PM   #5
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
You can set your keyboard to support international characters through composition. e.g. typing "o is interpretted as ö, `e turns into an è and so on.

The keyboard layouts which do this are called things like "international with dead keys". You can set up multiple layouts and swap between them using a global keyboard shortcut or with the systray keyboard switcher.

Here's the step by step to setting this up:
  1. open the KDE control centre (from the K menu or by running kcontrol)
  2. navigate to regional and language -> keyboard layout, select "enable keyboard layouts".
  3. you will have your normal keyboard layout in the "active layouts" list. You can simply change the variant to "intl", or you can leave the default as it is, and add an additional layout for the times when you want to enable character composition. This is what I do.
  4. An alternative is simply to add a normal keyboard layout for a different country which supports the characters you want to use. This will be very hard to use unless you have a good memory though!
  5. You can choose if the layout should be global (affects all applications) or if KDE keeps track of the keyboard layout per application in the "switching options" tab. I prefer global, but it's up to you.
  6. Apply the changes and you should see a little flag icon in your systray which is an indicator for the current layout.
  7. You can add a global keyboard shortcut to switch active keyboard layout from the "leyboard and mouse -> keyboard shortcuts panel. I use control+alt+space.

I hope that is clear - explaining GUI operations with text is difficult.
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Typing Special Characters in KDE 3.5.x tronayne Linux - Desktop 5 07-06-2007 04:14 PM
Typing Characters Not on the Keyboard Kamex Linux - Software 1 03-02-2005 03:56 PM
Typing International Characters jrdioko Linux - General 12 09-19-2004 08:21 PM
Trouble Typing Special Characters (Debian) Cruxus Linux - Newbie 1 10-17-2003 12:47 AM
typing other language characters NGraphiX Linux - General 2 06-16-2003 08:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration