Keyboard

xkb 符號文件中的 EIGHT_LEVEL_ALPHABETIC 和 EIGHT_LEVEL 有什麼區別?

  • March 22, 2021

標題說明了一切。兩者之間有什麼區別?在創建自定義八級佈局時,我應該何時選擇一個而不是另一個?

partial alphanumeric_keys xkb_symbols "T3"對於上下文,這裡是dexkb 符號文件的摘錄。

   key.type[Group1] = "EIGHT_LEVEL_ALPHABETIC";
   key <AB01> { [               y,               Y,           U203A,        NoSymbol,           U0292,           U01B7,   guillemotleft,        NoSymbol ] };
   key <AB02> { [               x,               X,  guillemotright,        NoSymbol, doublelowquotemark, singlelowquotemark, guillemotright,   NoSymbol ] };
   key <AB03> { [               c,               C,       copyright,        NoSymbol,            cent,       copyright,  Greek_horizbar,        NoSymbol ] };
   key <AB04> { [               v,               V,   guillemotleft,        NoSymbol, leftdoublequotemark, leftsinglequotemark,   U2039,        NoSymbol ] };
   key <AB05> { [               b,               B,           U2039,        NoSymbol, rightdoublequotemark, rightsinglequotemark, U203A,        NoSymbol ] };
   key <AB06> { [               n,               N,          endash,        NoSymbol,           U019E,           U0220,          endash,        NoSymbol ] };
   key <AB07> { [               m,               M,        Greek_mu,        NoSymbol,              mu,       masculine,          emdash,        NoSymbol ] };
   key.type[Group1] = "EIGHT_LEVEL";
   key <AB08> { [           comma,       semicolon,           U02BB,        NoSymbol,        ellipsis,        multiply,          dollar,        NoSymbol ] };
   key <AB09> { [          period,           colon,           U200C,        NoSymbol,  periodcentered,        division,      numbersign,        NoSymbol ] };
   key <AB10> { [           minus,      underscore,          hyphen,        NoSymbol,           U0140,           U013F,           U2011,        NoSymbol ] };

經過一些測試並查看了這些級別的定義,不同之處在於ALPHABETIC類型鎖定到第二級CAPS LOCK,而非ALPHABETIC第二級只有在按下時才能實現SHIFT

請參閱以下部分/usr/share/X11/xkb/types/level5。只有在ALPHABETIC你才能找到map[Lock] = Level2;map[Lock+LevelFive] = Level6;等等…

   type "EIGHT_LEVEL" {
   modifiers = Shift+LevelThree+LevelFive;
   map[None] = Level1;
   map[Shift] = Level2;
   map[LevelThree] = Level3;
   map[Shift+LevelThree] = Level4;
   map[LevelFive] = Level5;
   map[Shift+LevelFive] = Level6;
   map[LevelThree+LevelFive] = Level7;
   map[Shift+LevelThree+LevelFive] = Level8;
   level_name[Level1] = "Base";
   level_name[Level2] = "Shift";
   level_name[Level3] = "Alt Base";
   level_name[Level4] = "Shift Alt";
   level_name[Level5] = "X";
   level_name[Level6] = "X Shift";
   level_name[Level7] = "X Alt Base";
   level_name[Level8] = "X Shift Alt";
   };

   type "EIGHT_LEVEL_ALPHABETIC" {
   modifiers = Shift+Lock+LevelThree+LevelFive;
   map[None] = Level1;
   map[Shift] = Level2;
   map[Lock]  = Level2;
   map[LevelThree] = Level3;
   map[Shift+LevelThree] = Level4;
   map[Lock+LevelThree] =  Level4;
   map[Lock+Shift+LevelThree] = Level3;

   map[LevelFive] = Level5;
   map[Shift+LevelFive] = Level6;
   map[Lock+LevelFive]  = Level6;
   map[LevelThree+LevelFive] = Level7;
   map[Shift+LevelThree+LevelFive] = Level8;
   map[Lock+LevelThree+LevelFive] =  Level8;
   map[Lock+Shift+LevelThree+LevelFive] = Level7;

   level_name[Level1] = "Base";
   level_name[Level2] = "Shift";
   level_name[Level3] = "Alt Base";
   level_name[Level4] = "Shift Alt";
   level_name[Level5] = "X";
   level_name[Level6] = "X Shift";
   level_name[Level7] = "X Alt Base";
   level_name[Level8] = "X Shift Alt";
   };

引用自:https://unix.stackexchange.com/questions/638922