![重新审视 Firefox 中忽略的 Xmodmap](https://linux22.com/image/1442144/%E9%87%8D%E6%96%B0%E5%AE%A1%E8%A7%86%20Firefox%20%E4%B8%AD%E5%BF%BD%E7%95%A5%E7%9A%84%20Xmodmap.png)
相关帖子,但没有解决方案:
https://stackoverflow.com/questions/20386403/xmonad-xmodmap-changed-tab-to-alt-gr-but-it-doesnt-work-on-firefox-or-thunderbi Iso_level3_shift 键在 Firefox(Linux)中不起作用
我有以下 ~/.Xmodmap
keycode 13 = 4 currency 4 currency dollar onequarter dollar
keycode 16 = 7 slash 7 slash braceleft division braceleft
keycode 21 = backslash dead_grave backslash dead_grave dead_acute notsign dead_acute
keycode 22 = BackSpace BackSpace BackSpace BackSpace Delete NoSymbol Terminate_Server NoSymbol NoSymbol Terminate_Server BackSpace BackSpace NoSymbol NoSymbol Terminate_Server
keycode 51 = apostrophe asterisk apostrophe asterisk dead_doubleacute multiply dead_doubleacute
keycode 134 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift
除了在 Firefox 中,它运行良好(xterm、Libreoffice 等)。
似乎只有我的 ISO_Level3_Shift 映射受到影响。我使用它来生成花括号和美元符号等键。
我的 /etc/X11/xorg.conf.d/30-keyboard.conf 中确实有
Section "InputClass"
Identifier "evdev keyboard catchall"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "XkbModel" "asus_laptop"
Option "XkbVariant" "intl"
Option "XkbLayout" "no"
EndSection
我查看了我的 Xorg.log.0,发现“intl”参数显然已被成功解析:
[ 429.097] (II) XINPUT: Adding extended input device "Apple Inc. Apple Internal Keyboard / Trackpad" (type: KEYBOARD, id 9)
[ 429.097] (**) Option "xkb_rules" "evdev"
[ 429.097] (**) Option "xkb_model" "asus_laptop"
[ 429.097] (**) Option "xkb_layout" "no"
[ 429.097] (**) Option "xkb_variant" "intl"
我的 Xorg.log.0 中没有警告或错误,除了:
[ 429.080] (II) XINPUT: Adding extended input device "Power Button" (type: KEYBOARD, id 6)
[ 429.080] (**) Option "xkb_rules" "evdev"
[ 429.080] (**) Option "xkb_model" "asus_laptop"
[ 429.080] (**) Option "xkb_layout" "no"
[ 429.080] (**) Option "xkb_variant" "intl"
[ 429.087] (EE) Error loading keymap /var/lib/xkb/server-0.xkm
[ 429.087] (EE) XKB: Failed to load keymap. Loading default keymap instead.
由于标识符是 evdev,我相信它甚至尝试将这些规则应用于电源按钮设备,但失败了。但是,我认为这与键盘无关,键盘被视为不同的设备;并且没有与该设备相关的错误或警告。
这是一台 Macbook Pro,它运行的是 Gentoo。