DaemonForums  

Go Back   DaemonForums > Miscellaneous > General software and network

General software and network General OS-independent software and network questions, X11, MTA, routing, etc.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 28th August 2009
Beastie Beastie is offline
Daemonology student
 
Join Date: Jan 2009
Location: /dev/earth0
Posts: 271
Thanked 23 Times in 23 Posts
Default Input foreign characters under X11

Hello everybody.

I've been using FreeBSD for years and never needed to type any non-English text until now. Is there anything like "alt codes for English-language Windows" that allow you to type alt+133 and get an "à" for example?
I'm using FreeBSD 7.2 and trying to get something like this under X11 (plain English is fine for console work). Note that I don't want to change the keyboard layout if possible. I just want to be able to input those alphabetic characters you find in the ASCII extended set.

I've always found all the answers to my questions in the handbook and man pages, but this one is really a PITA and I can't find anything.
I read the I18N/L10N chapters in the handbook and tried to use ISO8859-1, ISO8859-15 and UTF-8 in any of ~/.cshrc ($LC_ALL), ~/.login_conf, ~/.xinitrc, to load iso15 fonts in /etc/rc.conf, and to set the virtual terminal as cons25l1 in /etc/ttys.
I've searched forums and google and the few pages I found didn't help at all.

With UTF-8, all I could get was Chinese, Korean and unknown (box) characters.

To be honest, I don't really know what I'm doing. I don't know what character set to use. I have no idea if I'm doing any of what should be done. I don't even know if what I'm trying to do is possible at all.

Please help before I lose my sanity
__________________
May the source be with you!
Reply With Quote
  #2   (View Single Post)  
Old 28th August 2009
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts
Default

There are several ways to do what you ask, I prefer remapping the "Windows keys" for use as a "Compose" key.

You can specify which key you want in your xorg.conf file, or via xmodmap(1)/setxkbmap(1).

For example, if you press the Compose key.. and then press the ' key, and finally the letter a, you'll get á.
Reply With Quote
  #3   (View Single Post)  
Old 28th August 2009
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts
Default

Also, if you happen to use a primarily GTK2+ environment.. you can enter UTF-8 into text consoles another way.

For example, ctrl+shift+u(release)e1 will also give you á.

Hope that helps.
Reply With Quote
  #4   (View Single Post)  
Old 29th August 2009
Beastie Beastie is offline
Daemonology student
 
Join Date: Jan 2009
Location: /dev/earth0
Posts: 271
Thanked 23 Times in 23 Posts
Default

Thanks very much for the help. I was completely off the mark, as I thought.

The UTF method is good and works but it's like learning a second "Windows alt codes" set. Besides, it's not really efficient.

I prefer the Xorg solution. However I'm facing a little problem. I added Option "XkbOptions" "compose:rwin" to Section "InputDevice". But it's not doing anything. I am supposed to press the right Win key, release it, press ', release it and finally press a, right?

On the other hand, when I type % setxkbmap -option compose:rwin or add it to ~/.xinitrc, the above combination works in any editor, editbox, web browser, etc.

What's going on?
__________________
May the source be with you!
Reply With Quote
  #5   (View Single Post)  
Old 29th August 2009
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Helpful companion
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Thanked 193 Times in 184 Posts
Default

Unfortunately I haven't tested the xorg.conf method, but I would assume it works the same way.. can someone else test and comment about this?
Reply With Quote
  #6   (View Single Post)  
Old 30th August 2009
Beastie Beastie is offline
Daemonology student
 
Join Date: Jan 2009
Location: /dev/earth0
Posts: 271
Thanked 23 Times in 23 Posts
Default

Other people are having the same problem on Debian. It seems the option was removed from xorg.conf, and it was supposedly replaced by one provided by HAL. However none of the variations of the code I found worked.

You can also map the Compose key by creating a ~/.Xmodmap file and adding e.g. keycode 116 = Multi_key to it for the right Win key.

Anyway, thanks for helping and putting me on the right track.
__________________
May the source be with you!
Reply With Quote
Reply

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Username longer than 16 characters _hmp_ FreeBSD General 5 13th January 2009 10:01 AM
C and file input/output 18Googol2 Programming 3 20th August 2008 04:02 PM
shell script with input c0mrade Programming 5 13th July 2008 04:33 AM
xkb multibyte characters input problem gosha General software and network 8 13th June 2008 12:13 AM


All times are GMT. The time now is 02:06 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick