Debian

鍵盤佈局切換鍵組合不起作用

  • December 1, 2018

我使用以下選項創建00-keyboard.conf了文件:/etc/X11/xorg.conf.d/

Section "InputClass"
       Identifier "system-keyboard"
       Option "XkbLayout" "latam,ru"
   Option "XkbVariant" ",qwerty"
       Option "XkbOptions" "grp:alt_shift_toggle"
EndSection

的輸出/var/log/Xorg.0.log

[    29.431] (**) HP Wireless hotkeys: Applying InputClass "system-keyboard"
[    29.431] (II) Using input driver 'evdev' for 'HP Wireless hotkeys'
[    29.431] (**) HP Wireless hotkeys: always reports core events
[    29.432] (**) evdev: HP Wireless hotkeys: Device: "/dev/input/event8"
[    29.432] (--) evdev: HP Wireless hotkeys: Vendor 0 Product 0
[    29.432] (--) evdev: HP Wireless hotkeys: Found keys
[    29.432] (II) evdev: HP Wireless hotkeys: Configuring as keyboard
[    29.432] (**) Option "config_info" "udev:/sys/devices/virtual/input/input9/event8"
[    29.432] (II) XINPUT: Adding extended input device "HP Wireless hotkeys" (type: KEYBOARD, id 15)
[    29.432] (**) Option "xkb_rules" "evdev"
[    29.432] (**) Option "xkb_model" "pc105"
[    29.432] (**) Option "xkb_layout" "latam,ru"
[    29.432] (**) Option "xkb_variant" ",qwerty"
[    29.432] (**) Option "xkb_options" "grp:alt_shift_toggle"
[   459.494] (II) intel(0): EDID vendor "LGD", prod id 902
[   459.494] (II) intel(0): Printing DDC gathered Modelines:
[   459.494] (II) intel(0): Modeline "1366x768"x0.0   76.40  1366 1402 1450 1610  768 771 776 790 +hsync -vsync (47.5 kHz eP)
[   459.494] (II) intel(0): Modeline "1366x768"x0.0   50.93  1366 1402 1450 1610  768 771 776 790 +hsync -vsync (31.6 kHz e)

這是來自的輸出localectl status

System Locale: LANG=es_CL.UTF-8
                 LANGUAGE=es_CL:es
      VC Keymap: n/a
     X11 Layout: latam
      X11 Model: pc105

按 Alt + Shift 什麼也不做。我在 Debian Jessie。

但是,setxkbmap -option grp:alt_shift_toggle latam,ru按預期工作。

如果您執行setxkbmap然後鍵綁定工作,您可以在啟動會話時執行該命令。這在 Openbox 中對我有用:我已將命令包含在~/.config/openbox/autostart

setxkbmap -option grp:switch,grp:alt_shift_toggle,grp_led:­scroll latam,ru

當然,您可以更改組合鍵。完整名單:

grep "grp:.*toggle" /usr/share/X11/xkb/rules/base.lst

並查看鍵盤的目前配置:

setxkbmap -print -verbose 10

引用自:https://unix.stackexchange.com/questions/364459