不保留修改器的映射 XKB 级别

不保留修改器的映射 XKB 级别

我正在尝试将 Super+V 映射到 XF86Paste:

default partial xkb_types "mine" {
  type "MY_SHIFT_SUPER" {
    modifiers = Shift+Mod4;
    map[None] = Level1;
    map[Shift] = Level2;
    map[Mod4] = Level3;
    # ???
    level_name[Level1] = "Base";
    level_name[Level2] = "Shift";
    level_name[Level3] = "Super";
  }
}
partial alphanumeric_keys
xkb_symbols "mine" {
  include "latin"
  # ...

  key <AB04> {
    type = "MY_SHIFT_SUPER",
    symbols[Group1] = [ v, V, XF86Paste ]
  }
}

Super+XF86Paste当我按下Super+时,这个功能就可以起作用v,但我只想要XF86Paste这个。

我尝试# ???用以下方法替换:

  • preserve[Mod4] =;- 这似乎不会导致任何错误,但它必然会导致v
  • preserve[Mod4] = None;(我不知道这None是否正确)这Super+XF86Paste必然会

我怎样才能做到这一点?

答案1

askubuntu 上的精彩回答这里

为了达到你的目的,它将会是这样的:

key <AB04> {
    type = "MY_SHIFT_SUPER",
    symbols[Group1] = [ v, V, NoSymbol ]
    actions[Group1] = [ NoAction(), NoAction(),
            RedirectKey(key=<XXXX>, clearmods=Mod4) ]       };
}

// pick an unused key, instead of XXXX
key <XXXX>{ [XF86Paste] };

相关内容