当 xkb 选项小键盘 (mac) 处于活动状态时,Chrome 浏览器如何将小键盘键视为箭头键?

当 xkb 选项小键盘 (mac) 处于活动状态时,Chrome 浏览器如何将小键盘键视为箭头键?

我使用 Num Lock 键作为元键,并永久设置了数字键盘键(就好像 Num Lock 始终处于活动状态一样)。许多桌面应用程序(konsoleAtom 编辑器、LibreOffice)甚至登录屏幕都将这些键视为数字键,但 Chrome 浏览器显然认为它们是箭头键,因此我在使用 Chrome(版本 86.0)时无法使用小键盘)。

这是我完整的 xkbmap 和操作系统版本(OpenSuSE Leap 15.1):

╭─jacek@epica ~  
╰─➤  setxkbmap -verbose 10        
Setting verbose level to 10
locale is C
Trying to load rules file ./rules/evdev...
Trying to load rules file /usr/share/X11/xkb/rules/evdev...
Success.
Applied rules from evdev:
rules:      evdev
model:      pc102
layout:     de
variant:    pl
options:    terminate:ctrl_alt_bksp,compose:sclk,altwin:meta_win,lv3:ralt_switch,numpad:mac
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwertz)
types:      complete+numpad(mac)
compat:     complete
symbols:    pc+de(pl)+inet(evdev)+terminate(ctrl_alt_bksp)+altwin(meta_win)+level3(ralt_switch)+compose(sclk)+terminate(ctrl_alt_bksp)
geometry:   pc(pc102)

╭─jacek@epica ~  
╰─➤  uname -a
Linux epica 4.12.14-lp151.28.71-default #1 SMP Thu Oct 8 12:40:48 UTC 2020 (dda1832) x86_64 x86_64 x86_64 GNU/Linux

xev似乎正确对待数字键盘键:

KeyPress event, serial 40, synthetic NO, window 0x7800001,
    root 0x561, subw 0x0, time 5259457, (-134,654), root:(702,683),
    state 0x0, keycode 90 (keysym 0xffb0, KP_0), same_screen YES,
    XLookupString gives 1 bytes: (30) "0"
    XmbLookupString gives 1 bytes: (30) "0"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x7800001,
    root 0x561, subw 0x0, time 5259617, (-134,654), root:(702,683),
    state 0x0, keycode 90 (keysym 0xffb0, KP_0), same_screen YES,
    XLookupString gives 1 bytes: (30) "0"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0x7800001,
    root 0x561, subw 0x0, time 5260449, (-134,654), root:(702,683),
    state 0x0, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XmbLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x7800001,
    root 0x561, subw 0x0, time 5260594, (-134,654), root:(702,683),
    state 0x0, keycode 87 (keysym 0xffb1, KP_1), same_screen YES,
    XLookupString gives 1 bytes: (31) "1"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0x7800001,
    root 0x561, subw 0x0, time 5260922, (-134,654), root:(702,683),
    state 0x0, keycode 88 (keysym 0xffb2, KP_2), same_screen YES,
    XLookupString gives 1 bytes: (32) "2"
    XmbLookupString gives 1 bytes: (32) "2"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x7800001,
    root 0x561, subw 0x0, time 5261058, (-134,654), root:(702,683),
    state 0x0, keycode 88 (keysym 0xffb2, KP_2), same_screen YES,
    XLookupString gives 1 bytes: (32) "2"
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0x7800001,
    root 0x561, subw 0x0, time 5261497, (-134,654), root:(702,683),
    state 0x0, keycode 89 (keysym 0xffb3, KP_3), same_screen YES,
    XLookupString gives 1 bytes: (33) "3"
    XmbLookupString gives 1 bytes: (33) "3"
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x7800001,
    root 0x561, subw 0x0, time 5261658, (-134,654), root:(702,683),
    state 0x0, keycode 89 (keysym 0xffb3, KP_3), same_screen YES,
    XLookupString gives 1 bytes: (33) "3"
    XFilterEvent returns: False

那么:为什么 Chrome 会忽略配置numpad (mac)中的设置xkb

答案1

好的,在我收到 Chrome 的小更新后,小键盘现在可以与浏览器配合使用。保留 Chrome for Unix 可能依赖的提示扫描码直接比在 X.org keycodes 上(概念缺陷?),我没有发现任何关于此事的信息。

相关内容