[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Adding foreign keys



Dave Swegen wrote:
> I will have to start writing the occasional document in swedish in the near
> future (with a bit of luck), but since I have a UK keyboard I don't really
> want to switch to a swedish layout. I would prefer to use <Alt Gr> or
> somesuch to assign the extra 6 chars needed to the current layout. Does
> anyone know how to do this for both X and VCs? Any info would be much
> appreciated.

I have changed my keyboard mapping a bit so maybe I can help. 
What I did was I remapped keys asdfer<space bar> so that when
I press Atl-Gr with them I get {}[]()\ respectively. As a
result, when I write code I can keep my left hand at its normal
position and hit Alt-Gr with my righ thumb to get all the
different parentheses plus backslash.

This is what my .Xmodmap looks like:

keysym a = a A braceleft
keysym s = s S braceright

keysym d = d D bracketleft
keysym f = f F bracketright

keysym e = e E parenleft
keysym r = r R parenright

keysym aring = slash
keysym space = space space backslash

The Finnish/Swedish keyboard also has aring (å) which I mapped 
to slash (/).

For VCs, here's a snippet from my /etc/kbd/default.map.gz
[cut]
keycode  30 = a               
        altgr   keycode  30 = braceleft
[cut]

The names for characters with diacritics in X seem to correspond
to HTML entities, so you might want to check out
http://strindberg.ling.uu.se/call/chars.html to find out the 
keysym names to put in .Xmodmap.

Another way to remap your keyboard is using the xkeycaps program 
which is available as a Debian package.

I hope this helps.

> Cheers
> 	Dave

// Heikki
-- 
Heikki Vatiainen                  * hessu@cs.tut.fi
Tampere University of Technology  * Tampere, Finland



Reply to: