Chrome
當 xkb 選項 numpad (mac) 處於活動狀態時,Chrome 瀏覽器如何將 numpad 鍵視為箭頭鍵?
我使用 Num Lock 鍵作為元鍵,並永久設置了數字鍵盤鍵(好像 Num Lock 一直處於活動狀態)。許多桌面應用程序(
konsole
、Atom 編輯器、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
?
好的,在我收到一個小的 Chrome 更新後,小鍵盤現在可以與瀏覽器一起使用。除了 Chrome for Unix 可能直接依賴掃描碼而不是 X.org 鍵碼(概念缺陷?)的提示外,我對此事一無所知。