Linux provides 2 ways to set up your keyboard. At the console you can use
loadkeys
and under XFree86 you can use xmodmap
.
To use the keytable for a Belgian keyboard you can use
loadkeys be2-latin1or
loadkeys be-latin1The only difference between the two is that be2-latin1 add support for twosuperior and threesuperior (keycode 41) and grave (keycode 43).
Usually loadkeys
is started at boottime from the scripts located
somewhere in /etc/rc.d Different distributions handle it
differentely. But most distributions have a simple program (like
kbdconfig
in RedHat or yast
in SuSE) to change the
scripts.
To set your keyboard properly under XFree86 you've got more choices. By
running Xconfigurator
(or a similar program) a config-file for
XFree86 is created (with some standard content). This file is called
XF86Config and is usually located in /etc or
/etc/X11
Make sure (and change otherwise) that something similar to this is given
under the Keyboard Section
.
Section "Keyboard" Protocol "Standard" XkbRules "xfree86" XkbModel "pc101" XkbLayout "be" EndSection
If you own a 'microsoft' keyboard (or the less-known penguin keyboards ;p)
you can enable those extra 3 keys by changing the "pc101"
into
"pc104"
. (I use the extra keys as meta-keys in my windowmanager so
some shortcuts doesn't conflict with the internal ones of my wm).
To get the AltGr key to work under XFree86 simply add in the
Keyboard Section:
RightAlt ModeShift
To get some key-combinations working under X11, you might want to change in file /usr/X11R6/lib/X11/xkb/symbols/be:
key <AD11> { [ dead_circumflex, diaeresis ], [ bracketleft ] }; key <AC11> { [ ugrave, percent ], [ quoteright ] }; key <BKSL> { [ mu, sterling ], [ quoteleft ] }; key <AB10> { [ equal, plus ], [ asciitilde ] };by
key <AD11> { [ dead_circumflex, dead_diaeresis ], [ bracketleft ] }; key <AC11> { [ ugrave, percent ], [ dead_acute ] }; key <BKSL> { [ mu, sterling ], [ dead_grave ] }; key <AB10> { [ equal, plus ], [ dead_tilde ] };
Some people prefer to use a 'compose'-key to enter their special characters, like:
<compose>'e => é <compose>/o => ø <compose>c, => ç <compose>co => © <compose>ss => ß
Solution:
xmodmap -e "keycode xx = Multi_key"or
xmodmap -e "keysym yy = Multi_key"and 'xx' is the keycode and 'yy' the kesym of the key you choose to be the 'compose'-key. (use
xev
to get these values)
Alternatively you can add
keycode xx = Multi_keyto your /.xmodmaprc. This way it happens automagically.
Some applications have to be compiled as 8-bit clean to work well with the European characterset. Others like to be told in advance.
You can load the ISO-8859-1 font by typing the following in console:
setfont lat1u-16.psf mapscrn trivial echo -ne '\033(K'
To be able to use ë, è, é or ç in console, you might want to add these to your /.inputrc:
set meta-flag on set convert-meta off set output-meta on
(this must be done for every user, if you want this to be default for all users you can either add this file to /etc/skel/ or you could add these lines to /etc/inputrc and add the following line to /etc/bashrc,
export INPUTRC=/etc/inputrc
)
Note: this is only useful to programs that use readline (like bash) Also set the following environment variables:
LC_CTYPE=iso-8859-1 SYSFONT=lat1u-16.psf SYSTERM=linux
Since Europe had to invent a new character, the Euro, there's a new
standard. It's called ISO-8859-15 (aka Latin-9 or Latin-0). To add support
you need both a new font and new keymaps. This is part of every major
distribution nowadays, if you have an older distributions you probably
need a newer console-tools
package.
The changes in the keymap-file consist of the following lines:
keycode 18 = +e +E currency keycode 46 = +c +C cent
And the following environment-variable should be set:
SYSFONT=lat0-16.psfto make sure you're using the right font.
Since Belgium is located in the Central European Time zone (aka MET) which (in the winter) is equivalent to the Greenwhich Mean Time plus 1 (GMT+1), you can simply link /usr/lib/zoneinfo/localtime/MET to /etc/localtime symbolicly like:
ln -sf /usr/lib/zoneinfo/MET /etc/localtimeor
ln -sf /usr/lib/zoneinfo/Europe/Brussels /etc/localtimeThis automagically sets Daylight Savings (which is GMT+2 in the summer).
Note: that different distributions have different paths, zoneinfo can be located in /usr/share or such...
Note2: RedHat uses a tool called timeconfig
, SuSE uses
yast
To change the CMOS clock and then synchronize the system time with the CMOS clock, do something like this:
hwclock --set --date="Feb 25 03:38" clock -u -s
If your clock is set to local time (which is discouraged but if you have other OS's installed a must), you can do:
hwclock --set --date="Feb 25 04:38" clock -s[Noticed the 1 hour difference ? ;p]
Not much programs support locale yet, if you want to know more about locale or how to write your own programs to support it, check: [put the damn url here ;p]
Be aware that locale makes it harder to resolve problems as less people can help you !! You might understand a problem when it's in technical English, but what if it's translated in some obscure French ?!? Some obviously won't understand both. ;p
To enable support for the Dutch locale in Belgium on a system with locale support you just have to set the following environment variables:
LANG=nl LANGUAGE=nl_BETry
nl_BE.ISO_8859-1
if nl_BE
does not work.
If you want French locale support in Belgium, set the following environment variabels:
LANG=fr LANGUAGE=fr_BETry
fr_BE.ISO_8859-1
if fr_BE
does not work.
If you want instead German locale support in Belgium, set the following environment variabels:
LANG=de LANGUAGE=de_BETry
de_BE.ISO_8859-1
if de_BE
does not work.
For Walloon locale support you can find files and information at: http://www.linuxi18n.org/locales/walon/. To use it set:
LANG=wa LANGUAGE=wa_BE:fr_BETry
wa_BE.ISO_8859-1
if wa_BE
does not work.
These options add support for the Belgian characterset and codepages. If you'd like to have these, compile a kernel with these options put on. They only apply to some filesystems (FAT-based, ISO9660, ...).
< > Codepage 850 (Europe) < > NLS ISO 8859-1 (Latin 1; Western European Languages) < > NLS ISO 8859-15 (Latin 9; Western European Languages with Euro)Located in
Filesystems
> Native Language Support
If your kernel is a modular kernel that came with your distribution (=you never compiled a kernel before), then you might want to type:
insmod nls_cp850 insmod nls_iso8859_1 insmod nls_iso8859_15