禁用或更改控制台切换键

禁用或更改控制台切换键

由于某些原因,在运行 Linux 2.6.38-13 的 Ubuntu 11.04 Natty 上(键盘采用意大利语布局),击键 AltFx在虚拟控制台(而不是正常CtrlAltFx按键)之间切换。

我可以改变什么来避免这种情况?

我尝试添加

Section "Serverflags"
Option "DontVTSwitch" "on"
EndSection

Section "InputClass"
     Identifier "keyboard defaults"
     MatchIsKeyboard "on"
     Option "XKbOptions" "srvrkeys:none"
EndSection

/etc/X11/xorg.conf文件但无济于事。有xmodmap我可以使用的设置吗?

答案1

男人xmodmap:

 EXPRESSION GRAMMAR
 keycode NUMBER = KEYSYMNAME ...<br>

 The list of keysyms is assigned to the indicated keycode (which may 
 be specified in decimal, hex or octal and can be determined by 
 running the xev program). Up to eight keysyms may be attached to a 
 key, however the last four are not used in any major X server 
 implementation. The first keysym is used when no modifier key 
 is pressed in conjunction with this key, the second with Shift, 
 the third when the Mode_switch key is used with this key and the 
 fourth when both the Mode_switch and Shift keys are used.

根据拱门维基这些字段的使用方式如下:

  1. 钥匙
  2. Shift+键
  3. 模式开关+按键
  4. 模式切换+Shift+按键
  5. AltGr+键
  6. AltGr+Shift+键

然而,当我跑步时xmodmap-pke我明白了第七字段被分配用于在 VT 之间切换:

键码 67 = F1 F1 F1 F1 F1 F1 XF86Switch_VT_1

这将根据哪个而有所不同类型您当前的布局配置为。获取默认值,尝试运行:

setxkbmap -v -types complete it
Warning! Multiple definitions of keyboard layout
         Using command line, ignoring X server
Warning! Multiple definitions of types
         Using command line, ignoring rules file
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+it+inet(evdev)
geometry:   pc(pc104)


也可能是您的窗口管理器或桌面环境(kde、gnome)窃取这些密钥并像您所说的那样在 VT 之间切换。

相关内容