为什么某些setxkbmap选项被忽略? [英] Why are some setxkbmap options ignored?

查看:179
本文介绍了为什么某些setxkbmap选项被忽略?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在share/X11/xkb/rules/evdev/lst中,我找到了这套ctrl选项

in share/X11/xkb/rules/evdev/lst, I find this set of options for ctrl

  ctrl                 Ctrl key position
  ctrl:nocaps          Caps Lock as Ctrl
  ctrl:lctrl_meta      Left Ctrl as Meta
  ctrl:swapcaps        Swap Ctrl and Caps Lock
  ctrl:ac_ctrl         At left of 'A'
  ctrl:aa_ctrl         At bottom left
  ctrl:rctrl_ralt      Right Ctrl as Right Alt
  ctrl:menu_rctrl      Menu as Right Ctrl
  ctrl:ctrl_ralt       Right Alt as Right Ctrl
  ctrl:swap_lalt_lctl  Swap Left Alt key with Left Ctrl key
  ctrl:swap_lwin_lctl  Swap Left Win key with Left Ctrl key
  ctrl:swap_lalt_lctl_lwin Left Alt as Ctrl, Left Ctrl as Win, Left Win as Alt

其中一些工作-如果运行setxkbmap -option -option 'ctrl:nocaps',我将获得正确的行为.但是,其他一些也会被忽略,例如setxkbmap -option -option 'ctrl:swap_lalt_lctl_lwin'.

Some of them work - if I run setxkbmap -option -option 'ctrl:nocaps', I get the correct behavior. However, some of the others are ignored, for example setxkbmap -option -option 'ctrl:swap_lalt_lctl_lwin'.

我发现,被忽略的选项由setxkbmap -query显示,而不由setxkbmap -print显示.这是这种行为的演示.

One observation I've made is that the ignored options are displayed by setxkbmap -query, but not by setxkbmap -print. Here's a demonstration of this behavior.

$ setxkbmap -option -option ctrl:nocaps
$ setxkbmap -query
rules:      evdev
model:      pc104
layout:     us
variant:    colemak
options:    ctrl:nocaps
$ setxkbmap -print
xkb_keymap {
    xkb_keycodes  { include "evdev+aliases(qwerty)" };
    xkb_types     { include "complete"  };
    xkb_compat    { include "complete"  };
    xkb_symbols   { include "pc+us(colemak)+inet(evdev)+ctrl(nocaps)"   };
    xkb_geometry  { include "pc(pc104)" };
};
$ setxkbmap -option -option ctrl:swap_lalt_lctl_lwin
$ setxkbmap -query                                  
rules:      evdev
model:      pc104
layout:     us
variant:    colemak
options:    ctrl:swap_lalt_lctl_lwin
$ setxkbmap -print                                  
xkb_keymap {
    xkb_keycodes  { include "evdev+aliases(qwerty)" };
    xkb_types     { include "complete"  };
    xkb_compat    { include "complete"  };
    xkb_symbols   { include "pc+us(colemak)+inet(evdev)"    };
    xkb_geometry  { include "pc(pc104)" };
};

我不知道该如何深入研究.一些其他的环境信息是

I don't know how to dig into this any deeper. Some further environment information is

  • Linux发行版是NixOs
  • 窗口管理器是XMonad,显示管理器是SLiM,没有桌面管理器
  • 键盘布局是colemak(如果我切换到qwerty,问题仍然存在)
  • 根据手册页,
  • setxkbmap版本为1.3.0
  • linux distribution is NixOs
  • window manager is XMonad, display manager is SLiM, no desktop manager
  • keyboard layout is colemak (problem persists if I switch to qwerty)
  • setxkbmap version is 1.3.0 according to the man page

推荐答案

这似乎是因为并非文件evdev.lst中列出的所有选项也都在相邻文件evdev中.我在

this appears to be because not all of the options listed in the file evdev.lst are also in the neighboring file evdev. I've asked a follow question as to why this is the case at why does the file evdev in /usr/share/X11/xkb/rules not match with evdev.lst?

这篇关于为什么某些setxkbmap选项被忽略?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆