Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've seen this question asked a few times before, but in different ways so here goed. In Windows you can insert a special character (accented e for instance) by pressing ALT and tapping in the ASCII code for the character. I haven't found a way to do this in Linux yet, but I can't believe no one has ever made a bit of code to produce this behaviour, I think I'm just unable to find it. So here's my question: does anyone know where I can find an applet (or something) that emulates the DOS behaviour of ALT+code=insert special character.
(This is not intended to be insulting, but I'm not looking for a workaround or a tutorial on mapping keys, I've found plenty of those. If you can tell me that the above behaviour is simply impossible in Linux, al least I can stop wasting my time looking for it, so I'd be grateful for that too.)
It's not impossible to do (what is in Linux?!?) but I haven't found anything to do this after a cursory Freshmeat search.
With the current abstration layers in Linux, this isn't something that's very easy to do.
One problem is that you've no idea which character set the kernel is configured to use natively; it could be a simple 8-bit ASCII varient, 16-bit unicode or (most commonly with new distros) UTF-8, where most characters are 8 bits but some are 16. 8-bit codes range from 0 to 255, while 16-bit codes go up to 65535, so how many numbers should you type in? Also, the character mappings are different for the terminal than they are for X-Windows, because of the event-driven nature of X.
IMHO, the Alt-number combination is really just a Windows work-around for the difficulty of mapping a scancode to a keycode (you have to design an entire character set and then load it all, so changing one key isn't portable across different character sets). It may be slightly more work initially to map a new character in Linux or X, but it does mean that you can actually type properly with the new character.
Thanks for the quick and complete reply, although it did kill my ambition to quickly program this 'simple applet' myself I'll start mapping keys then.
Cheers,
Merijn
If you just want a Windows-compatibility alt-key “applet”, then that's not too hard; you just assume that the user's using ISO-8859-1 or whatever. (It would be better to make the codepage be selectable)
Some unusual characters are already mapped to the key combination [Right "Alt GR" Key] & [Another key].
Eg try [Right "Alt GR" Key] and m - you get the greek mu symbol: µ
I don't think all keys are mapped, and I do not know where this happens.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.