Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Linux has pre-defined keyboard layouts for many languages, Russian, German, French, English, and many more. How can I create one that does not currently exist?
The language in question is Nuer, which is a Sudanese language. There are unicode fonts that have support for the Nuer language, and I can currently create documents in Nuer in OOo 2.4 on Kubuntu 8.04 using the US keyboard and the Insert | Special Characters function in OOo. This however, is quite tedious. I know what the layout for the Nuer keyboard should be as I have a picture of it. This keyboard does exist for Windows through the use of third-party software, but I no longer use Windows.
I now need a tutorial on how to create a custom keyboard definition for this language in Linux. Where do I begin?
I know that there are third party Linux solutions available as well, but Linux seems to have all the 'parts' already in place to create what I need, so I'd rather do it that way if I can.
Last edited by Frank616; 06-19-2008 at 10:43 PM.
Thanks for that link. I've seen it before, and it is old, being dated in 2004. However, I see that there is an updated page that is linked on the one you sent me, and it is current to 2007. This may well be what I need.
I spend several hours this afternoon going over the first link I received. While I successfully created a new keyboard file, and got KDE to see it, register it, and switch to it, I am now painfully going through the intricacies of the file structure itself. I've managed to decipher the way the 'variants' in the definition files are called, but I've not yet successfully been able to modify a key's behavior. I'll delve more into that tomorrow to see why my modifications did not 'take', even after a fresh login or a full reboot.
If anyone finds more information on the use of the alt and ctrl keys as modifier keys, I would appreciate that. I've yet to get that portion to work. There are 4 entries for each key: normal, shift, alt, and alt-shift. It is the last two that I haven't been able to get working yet in the US keyboard definition file that I started with. I wonder if there is some global that I have to set before the alt key modifier is accepted?
Solved! - Creating custom keyboard definition file Reply to Thread
OK, I hate the word 'cool' but this is just WAY COOL!
I was given this link. It is a bit of a tutorial on how to do what I was looking for. It not only gives some examples, but additional helpful links at the bottom.
By the way, this was all done in Kubuntu 8.04.
I copied the US keyboard file to another one called us_nuer (copy attached). I then loaded it. In KDE, this is done from Control Center | Regional and Language | Keyboard layout (or similar depending on your distro). Once this is enabled, you get a keyboard key in the kicker which you can click to change keyboard layouts.
In the us keyboard definition file there are several sections with alternate key layouts which one can select from the dropdown list box. I selected the us_intl variant as it has a lot of the keys I needed already redefined. The layout I needed to recreate is here and I began building it from the "us intl" variant.
A lot of it was pretty easy. Some of the keys I just redefined, like the 'q' I changed to show U014B and U014A which is the 'N' with the hook on it. OOo in the Insert | Special Characters menu choice opens up a list of all the glyphs available in the typeface you have selected. I just went through there, found the ones I needed, noted their unicode numbers, and redefined my keys with those unicode numbers.
If you look at the attached keyboard definition file in the section marked xkb_symbols "intl" you will see the changes I made. Any of the entries listed in unicode format (Uxxxx where x is a hex number) I put in there.
The really cool trick came however in trying to create the diaeresis (double dot over the letter) and macron below keys (an underline) on the comma and semicolon keys. There is no glyph in the typeface I am using (though it is created specifically for multilingual use) to give the backwards '3' with a diaeresis. I thought I was hooped until I could find another typeface. However....
Further down in that same attached file is another variant on the us keyboard called xkb_symbols "olpc" which I am guessing is from the One Laptop Per Child initiative. It has some strange numbers in there that creates one character from two by non-destructively backspacing and inserting the additional character. I have no idea how it does that, but it works. Notice, in the olpc variant, the line:
That number 0x1000308 non-destructively backspaces, then puts a double dot over the last character you typed! You can put a diaeresis over any character you can type, including numbers and symbols!
What I did was to move that 'magic number' to the comma key. However, note that this number is in the third column in that key definition line. That means that you have to press the alt key as a modifier to get the diaeresis, just like you would press the shift key to get the capital. So, on the comma key which I redefined in my section (intl), I get the comma, I get a double quote with shift-comma, and I get the diaeresis with alt-comma! I love it!
Interesting to note that some friends of ours bought a commercial keyboard program for Windows which is unable to create the diaeresis on the backwards '3' as there is no single glyph for it in the typeface.
Now, the only other thing I had to change was the modifier key. Normally in all these alternates in this file, there is a line at the bottom of each section that reads:
This means that the third level is reached with the Right Alt key (ralt). For me this is a pain, as the keys I want are typed with the right hand (comma and semicolon). It would be better if the modifier key were the Left Alt key. So, in my defintion, I change the last line to read:
Which makes the left alt key the modifier key. And it actually worked!!
It took some reading, and a bit of playing around for a few nights, but I now have a fully functional keyboard in the language I wanted -- and all with native Linux tools!
Ah, the joys of success!
Oh -- a PS: If you try out this keyboard file, make sure you change back to your default keyboard before you shut down your machine or the screen saver kicks in and requires your password. If your password requires a character that was removed when the keyboard was redefined, you won't be able to key it in to reopen your account. I found out the hard way.
I later discovered that there is a way around this in KDE, as the login screen shows a button for the keyboard in use. You can change back to the default layout there before you put in your password.
PPS: I had to chop a lot out of the standare us keyboard definition file as it is too long for the forum software to accept it. What I have posted here may or may not work on your machine as I just chopped out what I THOUGHT was not necessary.