Comment 55 for bug 937822

Revision history for this message
In , Matthias Clasen (mclasen) wrote :

    type "CTRL+ALT" {
        modifiers = Control+Alt+Shift+LevelThree;
        map[None] = Level1;
        map[Shift] = Level2;
        map[LevelThree] = Level3;
        map[Shift+LevelThree] = Level4;
        map[Control+Alt] = Level5;
        preserve[Shift] = Shift;
        preserve[Shift+LevelThree] = Shift;
        level_name[Level1] = "Base";
        level_name[Level2] = "Shift";
        level_name[Level3] = "Alt Base";
        level_name[Level4] = "Shift Alt";
        level_name[Level5] = "Ctrl+Alt";
    };

Here is a modified type for CTRL+ALT that works in my testing.
It is similar to the one in comment 17, but avoids blowing up the map with lots of new entries.

With this map, XkbTranslateKeyCode still translates Shift-F10 into F10 at level1, but the Shift modifier is now preserved, so GTK+ uses it when matching accelerators, and thus F10 and Shift-F10 can once again have different bindings.