让修饰键(Alt、Ctrl)与 ISO_Level3_Shift 一起使用

让修饰键(Alt、Ctrl)与 ISO_Level3_Shift 一起使用

我使用两级 Shift 键对键盘布局进行了相当大的改变。现在基本上我的键盘有 3 层。为此,我使用了 ISO_Level3_Shift 和 ISO_Level5_Shift。

default partial alphanumeric_keys modifier_keys xkb_symbols "basic" {
  name[Group1]= "Thinkpad US (portuguese AltGr dead keys)";

  include "us(basic)"

  // Modkeys
  // -------
  // POP
  key <AC10>  { type[Group1]="EIGHT_LEVEL", [ ISO_Level3_Shift, ISO_Level3_Shift, ISO_Level3
_Shift, ISO_Level3_Shift, question, question, NoSymbol ] };
  modifier_map Mod3 { <AC10> };

  // SNAP
  key <CAPS>  { type[Group1]="EIGHT_LEVEL", [ ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5
_Shift, ISO_Level5_Shift, colon, colon, NoSymbol ]   };
  key <AC11>  { type[Group1]="EIGHT_LEVEL", [ ISO_Level5_Shift, ISO_Level5_Shift, ISO_Level5
_Shift, ISO_Level5_Shift, semicolon, semicolon, NoSymbol ]   };
  modifier_map Mod3 { <CAPS>, <AC11> };

  replace key <ESC> { [ Caps_Lock ] };


  key.type[Group1]="EIGHT_LEVEL_ALPHABETIC" ;

  // middle row
  // ----------
  // asdfghjkl
  // [SNAP]
  key <AC01> { [ a, A, NoSymbol, NoSymbol, asciitilde, asciitilde, NoSymbol ] };
  key <AC02> { [ s, S, Home, Home, equal, equal, NoSymbol ] };
  key <AC03> { [ d, D, Prior, Prior, apostrophe, apostrophe, NoSymbol ] };
 key <AC04> { [ f, F, Next, Next, quotedbl, quotedbl, NoSymbol ] };
  key <AC05> { [ g, G, End, End, minus, minus, NoSymbol ] };
  key <AC06> { [ h, H, Left, Left, plus, plus, NoSymbol ] };
  key <AC07> { [ j, J, Down , Down, comma, comma, NoSymbol] };
  key <AC08> { [ k, K, Up, Up, period, period, NoSymbol ] };
  key <AC09> { [ l, L, Right, Right, Escape, Escape, NoSymbol ] };
  // [POP]
  // [SNAP]

  // Space key
  // ---------
  key <SPCE> { [ space, space, grave, grave, Tab, Tab, NoSymbol ] };

};

除非使用普通修饰键(如 Alt、Control 或 Windows 键),否则这将按预期工作。

例如,当与 SNAP [;] 键一起按下时,Space 设置为 Tab(因此 SNAP+Space = Tab)键,但如果我按 Alt+SNAP+Space,我不会从 Alt+Tab 获得预期的行为,如下所示预期的。

我怎样才能实现正确的功能?

相关内容