Keyboard
Thomas Worthington
tww at tww.cx
Mon Apr 19 06:19:32 PDT 2010
On Mon, 19 Apr 2010 00:51:11 +0100, Peter Hutterer
<peter.hutterer at who-t.net> wrote:
> On Sat, Apr 17, 2010 at 06:21:34PM +0100, Thomas Worthington wrote:
>> Hi,
>> I've been trying to convert my system to hald and I've some issues
>> with
>> my keyboard. The keyboard is an IBM model M 102-key with a British
>> layout.
>>
>> If I execute
>>
>> setxkbmap -rules xorg -model pc102 -layout gb -option ctrl:nocaps
>>
>> then none of the arrow, home, delete etc. keys work. But if I do
>>
>> setxkbmap -v -rules xorg -model evdev -layout gb -option ctrl:nocaps
>>
>> then the system responds with
>>
>> Trying to build keymap using the following components:
>> keycodes: evdev+aliases(qwerty)
>> types: complete
>> compat: complete
>> symbols: pc+gb+inet(evdev)+ctrl(nocaps)
>> geometry: pc(pc104)
>>
>> I don't have 104 keys so I tried
>>
>> setxkbmap -v -rules xorg -model evdev -geometry pc102 -layout gb -option
>> ctrl:nocaps
>>
>> And that responds with:
>>
>>
>> Trying to build keymap using the following components:
>> keycodes: evdev+aliases(qwerty)
>> types: complete
>> compat: complete
>> symbols: pc+gb+inet(evdev)+ctrl(nocaps)
>> geometry: pc102
>> Error loading new keyboard description
>>
>> and appears to do nothing.
>>
>>
>> So that's the first issue: how do I get the system to recognize that
>> I've
>> got a 102-key keyboard.
>
> unless you want to paint pretty pictures of your keyboard it doesn't
> really
> matter which geometry is picked. and IIRC except br and jp all layouts
> default to pc104 now for that reason.
>
> with evdev, the "model" is partially obsolete since it's now
> standardised by
> the kernel.
>
>> The second issue is a more general one. Because I have only 102 keys,
>> I've
>> put together quite an unusual keymap which I've applied with xmodmap up
>> until now. The most important mapping are:
>>
>> AltGr produces Meta_R and Mod3
>> Alt produces Alt_L
>> Print produces Multi_kry
>> Scroll Lock produces Mode Switch
>> Pause produces Caps Lock
>> Caps Lock produces Control (this one I can do!)
>>
>> How do I get the xorg keyboard driver to produce these same mappings?
>
> xkeyboard-config has the mappings that allow you to specify "ctrl:nocaps"
> and the map then filled in with the right keysyms. Your chanages For any
> changes you want to add, it's best to write it up as options.
OK. I couldn't work out how to get setxkbmap to recognize a completely new
symbol file ("customised") so I hacked altwin to read:
partial modifier_keys
xkb_symbols "meta_alt" {
key <LALT> { [ Alt_L ] };
key <RALT> { [ Meta_R ] };
key <PRSC> { [ Multi_key ] };
key <SCLK> { [ Mode_switch ] };
key <PAUS> { [ Caps_Lock ] };
modifier_map Mod3 { Meta_R };
modifier_map Mod1 { Alt_L };
// modifier_map Mod4 {};
};
and used -option altwin:meta_alt
I would far rather have put the new mappings into a file on their own;
what else needs updated to allow setxkbmap to read new symbol tables and
new entries within existing ones, for that matter?
Also: is there a program which will dump out the keycodes, so that I can
find out which keys correspond to which <CODE> when I'm using a strange
keyboard and want to remap it?
Thomas Worthington
More information about the xorg
mailing list