This thread is specific for Mandrake distro (but perhaps can be used by other Linux's flavours). It seems that in the Linux community (at least in the forums) all the expert are disappeared...
I wanted to insert new key "compose" key combinations on my keyboard...
I began my investigation studying the boot process by examinating the logs
After isolating the messages relating to the last boot (you have about 20 Mb of messages...), I searched for the keyword "keymap", and I found that us.kmap.gz is loaded two times from
Code:
/usr/lib/kbd/keymaps/i386/qwerty/us.kmap.gz
]
(I have a USA keyboard without Win keys).
Together with us.kmap (see below)
Code:
# us.kmap
keymaps 0-2,4-6,8-9,12
alt_is_meta
include "qwerty-layout"
include "linux-with-alt-and-altgr"
strings as usual
keycode 1 = Escape
keycode 2 = one exclam
keycode 3 = two at at nul nul
keycode 4 = three numbersign
control keycode 4 = Escape
keycode 5 = four dollar dollar Control_backslash
keycode 6 = five percent
control keycode 6 = Control_bracketright
keycode 7 = six asciicircum
control keycode 7 = Control_asciicircum
keycode 8 = seven ampersand braceleft Control_underscore
keycode 9 = eight asterisk bracketleft Delete
keycode 10 = nine parenleft bracketright
keycode 11 = zero parenright braceright
keycode 12 = minus underscore backslash Control_underscore Control_underscore
keycode 13 = equal plus
keycode 14 = Delete
keycode 15 = Tab
keycode 26 = bracketleft braceleft
control keycode 26 = Escape
keycode 27 = bracketright braceright asciitilde Control_bracketright
keycode 28 = Return
alt keycode 28 = Meta_Control_m
keycode 29 = Control
keycode 39 = semicolon colon
keycode 40 = apostrophe quotedbl
control keycode 40 = Control_g
keycode 41 = grave asciitilde
control keycode 41 = nul
keycode 42 = Shift
keycode 43 = backslash bar
control keycode 43 = Control_backslash
keycode 51 = comma less
keycode 52 = period greater
keycode 53 = slash question
control keycode 53 = Delete
keycode 54 = Shift
keycode 56 = Alt
keycode 57 = space
control keycode 57 = nul
keycode 58 = Caps_Lock
keycode 86 = less greater bar
keycode 97 = Control
the boot process loads also:
Code:
/usr/lib/kbd/keymaps/include/compose.latin.inc.gz
The us.kmap seems merely a scancode list, but why load it twice?
More interesting is the associated "compose.latin.inc.gz", which is too big to list.
Only some lines...:
Code:
#
# Default compose file
#
# Those compose lines can be shared between latin1, 2 and 3. They give good
# results.
compose '!' '!' to '¡'
compose '"' 'A' to 'Ä'
compose '"' 'E' to 'Ë'
compose '"' 'I' to 'Ï'
compose '"' 'O' to 'Ö'
compose '"' 'U' to 'Ü'
By means of:
Code:
hexdump -Cv compose.latin.inc
which output is:
00000000 23 0a 23 20 44 65 66 61 75 6c 74 20 63 6f 6d 70 |#.# Default comp|
00000010 6f 73 65 20 66 69 6c 65 0a 23 0a 23 20 54 68 6f |ose file.#.# Tho|
00000020 73 65 20 63 6f 6d 70 6f 73 65 20 6c 69 6e 65 73 |se compose lines|
00000030 20 63 61 6e 20 62 65 20 73 68 61 72 65 64 20 62 | can be shared b|
00000040 65 74 77 65 65 6e 20 6c 61 74 69 6e 31 2c 20 32 |etween latin1, 2|
00000050 20 61 6e 64 20 33 2e 20 54 68 65 79 20 67 69 76 | and 3. They giv|
00000060 65 20 67 6f 6f 64 0a 23 20 72 65 73 75 6c 74 73 |e good.# results|
00000070 2e 0a 63 6f 6d 70 6f 73 65 20 27 21 27 20 27 21 |..compose '!' '!|
00000080 27 20 74 6f 20 27 a1 27 0a 63 6f 6d 70 6f 73 65 |' to '¡'.compose|
00000090 20 27 22 27 20 27 41 27 20 74 6f 20 27 c4 27 0a | '"' 'A' to 'Ä'.|
000000a0 63 6f 6d 70 6f 73 65 20 27 22 27 20 27 45 27 20 |compose '"' 'E' |
000000b0 74 6f 20 27 cb 27 0a 63 6f 6d 70 6f 73 65 20 27 |to 'Ë'.compose '|
000000c0 22 27 20 27 49 27 20 74 6f 20 27 cf 27 0a 63 6f |"' 'I' to 'Ï'.co|
000000d0 6d 70 6f 73 65 20 27 22 27 20 27 4f 27 20 74 6f |mpose '"' 'O' to|
000000e0 20 27 d6 27 0a 63 6f 6d 70 6f 73 65 20 27 22 27 | 'Ö'.compose '"'|
000000f0 20 27 55 27 20 74 6f 20 27 dc 27 0a 63 6f 6d 70 | 'U' to 'Ü'.comp|
you can see that '¡' is hex 'a1' (that is only one byte: the acute accented 'i') and so on.
Make a comparison with the Extended ASCII Table (Code Page 850).
My question is (at last... you can say):
How can I use the Compose key combinations to obtain the listed characters (and the others)?
It seems that an extended mapping is already loaded, but it doesn't match:
For example:
Code:
normal characters: `1234567890-= qwertyuiop[] asdfghjkl;' zxcvbnm,./
AltGr + " ¬¹²³¼½¾{[]}\ @łe¶ŧ←↓→øþ æßðđŋħjĸł «»¢“”nµ·
AltGr+Shift+char ¬¡⅛£$⅜⅝⅞™±°¿ ΩŁE®Ŧ¥↑ıØÞ ƧЪŊĦJ&Ł <>©`'Nº×÷
For AltGr I mean the Alt key on the right.
If I could replicate the key combinations of "compose.latin.inc.gz", I could choose the combinations that interest to me (writing a new "compose.latin.inc.gz")...
... or do you know from where come out the key combinations already present on the keyboard?
During my attempts to get useful key combinations, I realized that my keyboard was setted as USA and so I changed to International (from the Control Center of Mandrake).
From that point on, I lost the AltGr key combinations (you can see a few lines above) but I got the "dead" keys (also if I don´t want them!).
The keymap files that are loaded during boot are:
Code:
/usr/lib/kdb/keymaps/i386/qwerty/us-latin1.kmap.gz
/usr/lib/kdb/keymaps/include/compose.latin.inc.gz
To go back to previous situation, it is sufficient to reset the keyboars as USA.
So I did to get rid off the hateful "dead" keys...
For those who don't know what is the "dead" key technique, a brief explanation:
to use particular keys (ticks, tilde and so on) to obtain accented letters.
When you press a dead key nothing appears (it seems dead), only when you press the following key (generally a vowel) you see the effect of the dead key (in form of various forms of accent).
If you want to use the tick (for example to define a string) you must press twice the key (utterly inconceivable!).
A last note: the AltGr key combinations generate mostly Unicode symbols or something like that because Linux refuses to make a backup of the (long!) post on hard disk.