Registered Member
|
Hi everybody,
this is similar to the question found here, but not quite the same. So instead of hijacking another person's thread, I'm pestering you with another one. Here goes: How do I enter characters that aren't native to my keyboard layout in KDE (4.2.0) apps by using the unicode value directly? In many (all?) GTK based apps, I have the Ctrl+Shift+U//Enter method. Isn't there anything similar for KDE? It just seems pretty awkward to me to fire up kcharselect and start searching around every time I want to enter a simple ñ or é or something. I've been searching for the answer to this for a while now and thought it should be trivial, but apparently it isn't. Sorry if this has an obvious solution or if it has been already discussed at length. In that case I'd appreciate a link, since my searches so far came up empty. Thanks! - furrySpider - |
Registered Member
|
First, pick a key you don't use often. Often people use the right logo key, but since I don't have one, I'll use the right Alt.
In the terminal run the command "xev" This should bring up a small window. Press the key you want. You'll get an output like this:
You're interested in the keycode value. Now, open .Xmodmap file (if you don't have one, create it) and add the line (replace 108 is the value you got)
Now run "xmodmap .Xmodmap" and you have the Compose key! Now you can various special characters by pressing (but NOT holding) the key and then a sequence. For example to create "á" you press "Compose ' a". Here are some examples: Compose ` a = à Compose ^ o = ô Compose " i = ï You can find more here. NOTE: If you didn't have the .Xmodmap file already (meaning your distribution does not check for it), you need to make sure that every time you start X the command "xmodmap .Xmodmap" is run!
Get problems solved faster - get reply notifications through Jabber!
|
Registered Member
|
Hi Alec,
thanks for the tip! I remember reading about how to set up a compose key somewhere, but so far didn't think of using that approach for this issue. It is not _quite_ what I'm looking for, though. The possibility of using the unicode value would alleviate the pain of having to use different approaches for special characters depending on the system in use (I use mainly KDE, but also have a lot of GTK apps, and at work we use that other OS). I think the GTK (or better: pango) way is a pretty decent solution. So if anyone knows of a method to enter unicode directly, I appreciate any pointers. But if there isn't, your suggested way works very nicely for a wide range of characters, and I'll start using it right now. Cheers! - furrySpider - |
Registered Member
|
Any news on this problem?
Anybody know how deeply the ctrl-shift-U feature is buried in Gnome? Maybe if it's just a shortcut that calls some specific app, I could try to get it working in KDE. |
Registered Member
|
Though what you want does not appear to be supported in KDE, KOffice does allow you to search for a Unicode character by its number. So perhaps you should add this as a wish to bugzilla.
John Hudson, proud to be a member of KDE forums since 2008-Oct.
|
Registered Member
|
The compose key is very useful; you may like dead keys too if you use a lot of special characters. To get dead keys whenever you want them, enable keyboard layouts in the KDE control center. I use the US international layout for dead keys. Not all editors will recognize the Ctrl+Shift+U hexcode method of entering arbitrary UTF-8 characters like they do under Gnome, but some do, e.g., abiword. Therefore, when my document needs characters unavailable using the compose key and/or dead keys, abiword is my choice. To enter an arbitrary unicode character by hex code, hold down Ctrl+Shift and Uxxxx, e.g., U20ac gives the Euro sign. hth ☺☺
|
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]