39aldo39/klfc

The `NONE_SHIFT_ALTGR_ALPHABETIC` keys are partially ignored by `xkbcomp`.

kindaro opened this issue · 2 comments

Description:

I am trying to build a customized fr(bepo) layout. You can see my source and build script
here.
Unfortunately, I discover that I cannot type ~, the tilde sign. I looked at the
compiled key map files and I discovered that keys that have type NONE_SHIFT_ALTGR_ALPHABETIC
lose their type when translated by xkbcomp, along with some of the mappings. See the relevant files:

  1. After converting json to xkb with klfc, the file xkb/symbols/kindaro-bepo:

         ...
         key.type[Group1] = "FOUR_LEVEL";
         key <AB04> { [       period,        colon,     ellipsis, periodcentered ] };
         key.type[Group1] = "NONE_SHIFT_ALTGR_ALPHABETIC";
         key <AB05> { [            k,            K,   asciitilde ] };
         key.type[Group1] = "FOUR_LEVEL";
         key <AB06> { [   apostrophe,     question, questiondown,    dead_hook ] };
         ...
    
  2. After invoking xkbcomp, the file xkm/kindaro-bepo.xkb:

         ...
         key <AB04> {
             type= "FOUR_LEVEL",
             symbols[Group1]= [          period,           colon,        ellipsis,  periodcentered ]
         };
         key <AB05> {         [               k,               K ] };
         key <AB06> {
             type= "FOUR_LEVEL",
             symbols[Group1]= [      apostrophe,        question,    questiondown,       dead_hook ]
         ...
    

An inspection reveals that all other keys of this type also lose the type.

Try it yourself:

The commit I linked above contains a build script. Clone, run, and you will have obtained these same
files.

My proposal:

It seems that xkbcomp does not recognize the type we want it to recognize. We can use
FOUR_LEVEL type instead and pad with NoSymbol.

It is actually my fault. I did not make sure that setxkbmap is made aware of the types file generated by klfc. If I add something like -types complete+kindaro-bepo, the types will be included and every key will be accounted for.

Note that I also created the script run-session.sh to set the layout, which you might find useful. It should be there with the generated files.