停用或變更控制台切換鍵

停用或變更控制台切換鍵

由於某些原因,在運行 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 之間切換。

相關內容