Yellow Dog Linux General

TOPIC: How to create a Swedish keyboard layout on a Powerbook G3 (1999, Lombard)



Introduction:
This documents covers the configuration of the console and XFree86 to activate a Swedish keyboard layout.

Console Mode
The installation went fine, the system even understood that I use Swedish keyboard (I have stated that during the installation procedure). The problem I have noticed was that I could not use symbols that need to be invoked with AltGr, i.e. @${[]}\|~ in console mode (runlevel 3). Some of them are of course rather important. Therefore I added keycode 96 = AltGr to the file /usr/lib/kbd/keytables/i386/qwerty/se-latin1.kmap ... which makes the right modifier key (just by the space bar, I don't know the Macish name for it) act as AltGr on a standard PC keyboard. Now the keymap works fine for my purposes. In order to be sure that I have a backup solution I have renamed the file to something like 'mykeymap.kmap'. What I needed to do was to change the contents of the file '/etc/sysconfig/keyboard' appropriately so that my keymap is loaded during the boot process.

In X
Ok, now the exciting part. As I understand the bits of documentation I have looked at, XFree 4 is intelligent enough to inherit (or infer) all necessary information about my keytable from the console setup. So I happily said startx and learned that I have only an American keyboard layout at my disposal. Not even se-latin1 is noticed!

>The first thing to do was to inform X about the Swedish keyboard by adding:

Option "XkbLayout" "se"
Option "XkbVariant" "nodeadkeys"
... to the file /etc/X11/XF86Config-4 in the keyboard section. This did half of the job, as was the case with console setup. The next thing was to get the {[]}\|@$ and some others to be accessible via the right meta key. I tried several modifications without success. Honestly, I found this to be the toughest part of the installation: the pointers to Franz Sirl's description of the new input layer are dead and it seems that there are no easily available documents about setting things up.

Eventually I succeeded. The steps leading there were the following:
  1. I dumped the current keyboard setup by:

    xmodmap -pk [ENTER]

  2. I created the keyboard layout file called "lombard" by modifying the existing powerpcps2 file in the '/usr/X11R6/lib/X11/xkb/keycodes/' directory, to a large extent by comparing the stuff with the output of 'xmodmap -pk', and sometimes helping myself with the 'xev'. The modification is sufficient for my purposes, but is probably not complete.

  3. I told XFree about my keyboard with:

    Option "XkbKeycodes" "lombard"

    ... in the XF86Config-4 file, keyboard section, reiterated a number of times to get the arrow keys working ... now everything seems to work fine.


I found one way of getting this to work in KDE as well:
After doing the adjustments mentioned, including putting "se" into the XF86Config-4 file entry for "XkbLayout", you should DISABLE keyboard layouts in the KDE Control Center, instead of choosing "swedish" as would be the natural choice. In my case this resulted in a perfectly functioning swedish keyboard layout on my PowerBook ("Bronze" or whatever the model is called), in the KDE environment.

As I mentioned, I have experimented a bit, therefore I give no guarantees whatsoever. But enjoy my lombard file at www.cs.lth.se/~jacek/lombard.

This HOWTO was written by Jacek



 
          Copyright ® 1999-2010. Fixstars Corporation. All rights reserved.
YDL.net Fixstars Corporation