LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-28-2005, 04:14 AM   #1
BroX
Member
 
Registered: Oct 2003
Location: Sweden
Distribution: Slackware64-current, SlackwareARM-15.0
Posts: 833

Rep: Reputation: 90
xmodmap å, ä, ö, and ø - or how to add Compose to X


Hey all,

being in Scandinavia, I would like to be able to type å, ä, ö, and ø. I've been reading all about xmodmap but can't get it to work. Another possibility would be to enable a Compose key, so that these kind of characters can be made with a",o", o/, etc, if you get what I mean. I tried adding this option to xorg.conf, but it didn't work.

I have an IBM T41 keyboard and would like to use the right_alt key for this compose function so I could create all sorts of characters. Or alternatively, creating alternative a's and o's while pressing right_alt, and shift-right_alt.

How should I go about this?

Cheers, Leon.
 
Old 10-28-2005, 09:20 AM   #2
sybille
Member
 
Registered: Dec 2004
Location: France
Posts: 41

Rep: Reputation: 15
What window/desktop manager do you use?
For example, I added the line to define the Multi_key to my ~/.fluxbox/startup script:
Code:
xmodmap -e "keycode 115 = Multi_key"
You could add the command to whatever script starts your desktop/window manager.

As an alternative, you could also define the Multi_key in an /etc/X11/xinit/.Xmodmap file (not present by default), which should be called by the xinitrc of any window/desktop manager. Then it would work for all users, too.

You could also make an .Xmodmap file in the user's home directory. I use the fluxbox startup script instead because I have other things in it - applications that start with fluxbox and some xset commands, for example - and it's easier for me when all of that stuff is in the same file.

Oh, I forgot to mention that you can determine the keycode by running xev from a term and then pressing the key you want to use as Multi_key. It will show you a lot of information, including the keycode for the key. (The key I use, 115, is the Redmond key on my keyboard.)

Once you have defined the compose key (Multi_key) in this way, you can make the alternate characters by using the keys defined in the Compose file for the locale you are using on the system, which can be found in /usr/X11R6/lib/X11/locale/subdirectory-for-your-locale. When I was learning this, I copied over the correct Compose file to my home directory for reference. So, for example, to make a euro symbol, the Compose file I use tells me to press:
Code:
<Multi_key> <e> <equal>	 : "\244"	EuroSign
So, I press Redmond, then hold down e and press = : €
There are several alternate keypresses defined for each character. But the point is that they are already defined in the Compose file. I'm sure it's possible to completely remap your keyboard so that you can use any keys you want, but I think that's a different thing altogether. Anyway, I don't know how to do that.

There are other approaches to using the Multi_key, as well. For example, see:
http://www.gentoo.org/news/en/gwn/20...newsletter.xml
(jump to section 8, Tips & Tricks)
But the one I'm using, with the fluxbox startup script, works just fine for me.

HTH

Last edited by sybille; 10-28-2005 at 10:17 AM.
 
Old 10-30-2005, 05:49 PM   #3
BroX
Member
 
Registered: Oct 2003
Location: Sweden
Distribution: Slackware64-current, SlackwareARM-15.0
Posts: 833

Original Poster
Rep: Reputation: 90
Compose - Solved!

Thanks sybille,

That's exactly what I needed! Added
Code:
keycode 113 = Multi_key
to ~/.Xmodmap and now I can easily create al characters I want!

I use Fluxbox. Keycode 113 is the right_alt key on Thinkpad keyboard.

Cheers, Leon.

Last edited by BroX; 10-30-2005 at 05:50 PM.
 
Old 10-31-2005, 08:34 AM   #4
sybille
Member
 
Registered: Dec 2004
Location: France
Posts: 41

Rep: Reputation: 15
Happy to hear that it worked for you!
 
  


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
Compose(No Subject) raysr Linux - Software 2 03-30-2005 10:08 PM
trying to config Thunderbird compose Paxmaster Linux - Networking 1 02-18-2005 12:22 PM
Compose new symbols with the keyboard fiomba Linux - Software 0 10-28-2004 04:24 AM
evolution 2.0 can't compose moschi Linux - Software 2 10-21-2004 01:32 AM
compose key not working jkobrien Linux - Hardware 1 08-05-2004 08:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:10 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