Hi,

> I'm on standard dvorak. I want to be able to press Alt_L + C and fire an 
> Up arrow key event.  The same for Alt_L + H, T, and N for Left, Down, 
> and Right respectively.

> It appears all roads lead to XKB, it seems like it could do the job. It 
> looks complicated enough, after three days of reading and testing I'm 
> still lost, please help.
> 
> My latest attempt was to modify the compat/misc file (it is included by 
> compat/complete). I added this:
> 
> interpret Alt_L+H {
>       action = Redirect( keycode=<LEFT> );
> };
> 
> And many variations of that, all failed when running the file by xkbcomp.

You misunderstood the meaning of modifiers in 'interpret' records.

What you need is the adding the third keysym to keys that now have two keysyms
and make its choice depending on LeftAlt key (or Alt modifier).

These letter keys have xkb type 'ALPHABETIC'.  In short it means
 * none modifier key is presed - use the first level keysym
 * Shift modifier bit is set - use the second level keysym
You need a new type for these keys with an additional 'rule'
 * Alt modifier bit is set - use the third level keysym.

OK. Take the description of the 'ALPHABETIC' type in /xkb/types/basic , copy it
and give it any arbitrary name (e.g. 'ALT_ALPAHBETIC')
The original description is
    type "ALPHABETIC" {
        modifiers = Shift+Lock;
        map[Shift] = Level2;
        map[Lock] = Level2;
        level_name[Level1] = "Base";
        level_name[Level2] = "Caps";
    };
Our new type should looks like
    type "ALT_ALPHABETIC" {
        modifiers = Shift+Lock+Alt;
        map[Shift] = Level2;
        map[Lock] = Level2;
        map[Alt] = Level3;
        level_name[Level1] = "Base";
        level_name[Level2] = "Caps";
        level_name[Level3] = "Arrows";
    };
(probably you want to add a rule for [Lock+Alt] combination too)

Now you can change your letter keys in the way
was:
    key <AB03> {        [         c,    C               ]       };
become:
    key <AB03> { type="ALT_ALPHABETIC",
                        [   c,   C,  Up  ]       };
etc.

-- 
 Ivan U. Pascal         |   e-mail: [EMAIL PROTECTED]
   Administrator of     |   Tomsk State University
     University Network |       Tomsk, Russia
_______________________________________________
I18n mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/i18n

Reply via email to