0

I thought I understood XKB, but apparently not... So first I have a question that make me unable to debug XKB: I have in a file (obtain with xkbcomp $DISPLAY output.xkb) a part like that:

    type "FOUR_LEVEL_MIXED_KEYPAD" {
        modifiers= Shift+NumLock+LevelThree;
        map[Shift+NumLock]= Level1;
        map[NumLock]= Level2;
        map[Shift]= Level2;
        map[LevelThree]= Level3;
        map[NumLock+LevelThree]= Level3;
        map[Shift+LevelThree]= Level4;
        map[Shift+NumLock+LevelThree]= Level4;
        level_name[Level1]= "Base";
        level_name[Level2]= "Number";
        level_name[Level3]= "Alt Base";
        level_name[Level4]= "Shift Alt";
    };

I would like first to create a copy of this type, so I copy pasted right below the same item with a different title:

    type "FOUR_LEVEL_MIXED_KEYPAD_CUS" {
        modifiers= Shift+NumLock+LevelThree;
        map[Shift+NumLock]= Level1;
        map[NumLock]= Level2;
        map[Shift]= Level2;
        map[LevelThree]= Level3;
        map[NumLock+LevelThree]= Level3;
        map[Shift+LevelThree]= Level4;
        map[Shift+NumLock+LevelThree]= Level4;
        level_name[Level1]= "Base";
        level_name[Level2]= "Number";
        level_name[Level3]= "Alt Base";
        level_name[Level4]= "Shift Alt";
    };

and I changed the line

    key  <KP2> {
        type= "FOUR_LEVEL_MIXED_KEYPAD",
        symbols[Group1]= [         KP_Down,            KP_2,           U2193,           U21D3 ]
    };

into

    key  <KP2> {
        type= "FOUR_LEVEL_MIXED_KEYPAD_CUS",
        symbols[Group1]= [         KP_Down,            KP_2,           U2193,           U21D3 ]
    };

(i.e. I just changed the name of the type)

Then I reload the file using xkbcomp output.xkb $DISPLAY... And now the key 2 does not work as before (other keys are unchanged), and basically when I use no modified it's like if I press directly the down button, while before it was printing a number (NumLock is enabled). If I remove the _CUS in the name, then it works as before.

How is that possible, as the two types are supposed to be the same?

Full document: http://paste.debian.net/1063043

  • I cannot reproduce. The _CUS type works just the same for me, and the KP_Down works similarly to KP_Up. You probably have something else going on there (xmodmap?) – pizdelect Jan 29 at 1:25
  • @pizdelect : Thanks for you answer. As far as I see I don't see any xmodmap running with sudo ps aux | grep xmodmap... But I think I get something interesting: when I apply something with xkb, the console et al. accepts the changes, but LibreOffice Calc (that I use for testing) need a restart to accept the change! So basically when I change a configuration, start LibreOffice, test it, it works, but when I switch back to original configuration without restarting LibreOffice, nothing happends until I restart LibreOffice! Any idea why??? – tobiasBora Jan 29 at 18:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.