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

Re: xmodmap



On Mon, Apr 27, 2009 at 10:07:03 +0000, marc wrote:
> 
> I'm trying to use the following local .xmodmaprc
> 
>   keycode  26 = e E e E eacute Eacute
>   keycode  31 = i I i I iacute Iacute
>   keycode  32 = o O o O oacute Oacute
>   keycode  30 = u U u U uacute Uacute
>   keycode  57 = n N n N ntilde Ntilde
> 
> via
> 
>   $ xmodmap .xmodmaprc
> 
> This runs fine, but the mappings for e and n don't 'take'. Initially, 
> it's as if eacute, Eacute, ntilde and Ntilde aren't defined.

[...]

> Any idea why there's a problem with the e and n keys?

You probably use a keyboard layout on which these two keys are of type
TWO_LEVEL or ALPHABETIC. That means the only recognized modifier is
SHIFT/CAPSLOCK and all further symbols are ignored. This behavior is
documented in /usr/share/X11/doc/input/XKB-Enhancing.txt.

I do not know how to override these restricted type definitions with
xmodmap, but it is not difficult to tweak the layout with xkbcomp:

$ xkbcomp $DISPLAY layout.xkb

will save the current layout in an xkb source file. You can edit the
relevant sections in this file, e.g. this one:

    key <AB06> {
        type= "ALPHABETIC",
        symbols[Group1]= [               n,               N ]
    };

These sections can be changed to have the same structure as the ones of
keys that do accept additional AltGr symbols, i.e.:

    key <AB06> {
        type= "FOUR_LEVEL_SEMIALPHABETIC",
        symbols[Group1]= [               n,               N, ntilde, Ntilde ]
    };

Once you are done editing the file you can compile the new keymap and
update the layout of the X server (both steps with one command): 

$ xkbcomp layout.xkb $DISPLAY

The changes should be effective immediately.

-- 
Regards,            | http://users.icfo.es/Florian.Kulzer
          Florian   |


Reply to: