linux – 尝试使用Xorg配置设置键盘布局,但它不起作用
作者:互联网
我正在尝试将HP Pavilion g6键盘布局设置为英语(我们)和阿拉伯语(ara).
我正在使用Fedora 18,但无论如何都遵循Arch Wiki.
这是我的90-keyboard-layout.conf文件:
Section "InputClass"
Identifier "keyboard"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "XkbModel" "pc105"
Option "XkbLayout" "us,ara(qwerty_digits)"
Option "XkbVariant" "qwerty_digits,qwerty_digits"
Option "XkbOptions" "grp:alt_shift_toggle"
EndSection
我已经输入了pc105,因为我不知道我的HP Pavilion g6键盘的相应XkbModel是什么(在/usr/share / X11 / xkb / rules / xorg中查找但未找到它).
我还有这个文件00-anaconda-keyboard.conf,其中包含:
#This file was generated by the Anaconda installer
Section "InputClass"
Identifier "keyboard"
MatchIsKeyboard "on"
Option "XkbOptions" "terminate:ctrl_alt_bksp,"
EndSection
Section "ServerFlags"
Option "DontZap" "false"
EndSection
这是我的setxkbmap -print:
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+us(qwerty_digits)+ara(qwerty_digits)(qwerty_digits):2+inet(evdev)+group(alt_shift_toggle)+terminate(ctrl_alt_bksp)" };
xkb_geometry { include "pc(pc104)" };
};
还缺少什么?到目前为止,布局切换根本不起作用.
解决方法:
像这样编辑你的90-keyboard-layout.conf:
Section "InputClass"
Identifier "keyboard"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "XkbModel" "evdev"
Option "XkbLayout" "us,ara"
Option "XkbVariant" ",qwerty_digits"
Option "XkbOptions" "grp:alt_shift_toggle"
EndSection
标签:linux,keyboard,fedora,xorg,keyboard-layout 来源: https://codeday.me/bug/20190813/1649057.html