|
General software and network General OS-independent software and network questions, X11, MTA, routing, etc. |
|
Thread Tools | Display Modes |
|
|||
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! |
|
|||
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 á. |
|
|||
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. |
|
|||
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! |
|
|||
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?
|
|
|||
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! |
|
|
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 |