这是我尝试过的:
$ xev
KeyRelease event, serial 43, synthetic NO, window 0x4a00001,
root 0x1db, subw 0x0, time 23449801, (434,-234), root:(1305,244),
state 0x1c, keycode 67 (keysym 0x1008fe01, XF86Switch_VT_1), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
$ systemctl list-units|grep getty
[email protected] loaded active running Getty on tty1
[email protected] loaded active running Getty on tty2
[email protected] loaded active running Getty on tty3
[email protected] loaded active running Getty on tty4
[email protected] loaded active running Getty on tty5
[email protected] loaded active running Getty on tty6
[email protected] loaded active running Getty on tty7
system-getty.slice loaded active active system-getty.slice
getty.target loaded active active Login Prompts
$ xmodmap -pke
keycode 67 = F1 F1 F1 F1 F1 F1 XF86Switch_VT_1
keycode 68 = F2 F2 F2 F2 F2 F2 XF86Switch_VT_2
keycode 69 = F3 F3 F3 F3 F3 F3 XF86Switch_VT_3
keycode 70 = F4 F4 F4 F4 F4 F4 XF86Switch_VT_4
keycode 71 = F5 F5 F5 F5 F5 F5 XF86Switch_VT_5
keycode 72 = F6 F6 F6 F6 F6 F6 XF86Switch_VT_6
keycode 73 = F7 F7 F7 F7 F7 F7 XF86Switch_VT_7
keycode 74 = F8 F8 F8 F8 F8 F8 XF86Switch_VT_8
keycode 75 = F9 F9 F9 F9 F9 F9 XF86Switch_VT_9
$ setxkbmap -print -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: pc104
layout: us
variant: intl-unicode
options: terminate:ctrl_alt_bksp
Trying to build keymap using the following components:
keycodes: evdev+aliases(qwerty)
types: complete
compat: complete
symbols: pc+us(intl-unicode)+inet(evdev)+terminate(ctrl_alt_bksp)
geometry: pc(pc104)
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+us(intl-unicode)+inet(evdev)+terminate(ctrl_alt_bksp)" };
xkb_geometry { include "pc(pc104)" };
};
cat /etc/X11/xorg.conf.d/00-keyboard.conf
# Written by systemd-localed(8), read by systemd-localed and Xorg. It's
# probably wise not to edit this file manually. Use localectl(1) to
# instruct systemd-localed to update it.
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "us"
Option "XkbModel" "pc104"
Option "XkbVariant" "alt-intl-unicode"
EndSection
启动时的 Xorg 日志
Information [ 6.294] (**) Eee PC WMI hotkeys: Applying InputClass "evdev keyboard catchall"
Information [ 6.294] (**) Eee PC WMI hotkeys: Applying InputClass "libinput keyboard catchall"
Information [ 6.294] (**) Eee PC WMI hotkeys: Applying InputClass "system-keyboard"
Information [ 6.294] (**) Eee PC WMI hotkeys: Applying InputClass "Keyboard Defaults"
Information [ 6.294] (II) Using input driver 'libinput' for 'Eee PC WMI hotkeys'
Information [ 6.294] (**) Eee PC WMI hotkeys: always reports core events
Information [ 6.294] (**) Option "Device" "/dev/input/event16"
Information [ 6.294] (**) Option "_source" "server/udev"
Information [ 6.295] (II) event16 - Eee PC WMI hotkeys: is tagged by udev as: Keyboard
Information [ 6.295] (II) event16 - Eee PC WMI hotkeys: device is a keyboard
Information [ 6.296] (II) event16 - Eee PC WMI hotkeys: device removed
Information [ 6.347] (**) Option "config_info" "udev:/sys/devices/platform/eeepc-wmi/input/input16/event16"
Information [ 6.347] (II) XINPUT: Adding extended input device "Eee PC WMI hotkeys" (type: KEYBOARD, id 14)
Information [ 6.347] (**) Option "xkb_model" "pc104"
Information [ 6.347] (**) Option "xkb_layout" "us"
Information [ 6.347] (**) Option "xkb_options" "terminate:ctrl_alt_bksp"
Information [ 6.349] (II) event16 - Eee PC WMI hotkeys: is tagged by udev as: Keyboard
Information [ 6.349] (II) event16 - Eee PC WMI hotkeys: device is a keyboard
Information [ 6.350] (II) config/udev: Adding input device PC Speaker (/dev/input/event8)
Information [ 6.350] (II) No input driver specified, ignoring this device.
Information [ 6.350] (II) This device may have been added with another device file.
Information [ 6.359] (**) USB Keyboard Consumer Control: Applying InputClass "evdev keyboard catchall"
Information [ 6.359] (**) USB Keyboard Consumer Control: Applying InputClass "libinput keyboard catchall"
Information [ 6.359] (**) USB Keyboard Consumer Control: Applying InputClass "system-keyboard"
Information [ 6.359] (**) USB Keyboard Consumer Control: Applying InputClass "Keyboard Defaults"
Information [ 6.359] (II) Using input driver 'libinput' for 'USB Keyboard Consumer Control'
Information [ 6.359] (**) USB Keyboard Consumer Control: always reports core events
Information [ 6.359] (**) Option "Device" "/dev/input/event4"
Information [ 6.359] (**) Option "_source" "_driver/libinput"
Information [ 6.359] (II) libinput: USB Keyboard Consumer Control: is a virtual subdevice
Information [ 6.359] (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.1/0003:0566:3067.0002/input/input4/event4"
Information [ 6.359] (II) XINPUT: Adding extended input device "USB Keyboard Consumer Control" (type: KEYBOARD, id 15)
Information [ 6.359] (**) Option "xkb_model" "pc104"
Information [ 6.359] (**) Option "xkb_layout" "us"
Information [ 6.359] (**) Option "xkb_options" "terminate:ctrl_alt_bksp"
我也没有检查“键盘设置>高级>其他兼容性选项>服务器中处理的特殊键”。
另请阅读这篇文章[https://forum.manjaro.org/t/virtual-consoles-not-working-ctrl-alt-f1-6/3902]但没有帮助。
还尝试了 Ctrl+Alt+Fn+[F1-F2-etc],但没有成功。
还尝试从 /etc/X11/xorg.conf.d/00-keyboard.conf 文件中注释掉“选项“XkbVariant”“alt-intl-unicode””。
$ chvt [1-2-3] 有效,我收到提示。
另外,一旦我到达 tty(通过 chvt),只要我不登陆图形会话,我就可以使用 Ctrl+Alt+F1,2 等在它们之间优雅地切换。我的键盘没有其他问题,甚至功能键和媒体键也能按预期工作。
PS:我的系统
$ neofetch
██████████████████ ████████ gaston@linux-desktop
██████████████████ ████████ --------------------
██████████████████ ████████ OS: Manjaro Linux x86_64
██████████████████ ████████ Kernel: 4.19.13-1-MANJARO
████████ ████████ Uptime: 1 hour, 2 mins
████████ ████████ ████████ Packages: 1539 (pacman)
████████ ████████ ████████ Shell: bash 4.4.23
████████ ████████ ████████ Resolution: 1920x1080
████████ ████████ ████████ DE: KDE
████████ ████████ ████████ WM: KWin
████████ ████████ ████████ WM Theme: breeze
████████ ████████ ████████ Theme: Breath [KDE], Breeze [GTK2/3]
████████ ████████ ████████ Icons: la-capitaine-icon-theme [KDE], Dex_KDE [GTK2/3]
████████ ████████ ████████ Terminal: konsole
Terminal Font: Noto Mono 10
CPU: Intel i5-6600K (4) @ 3.900GHz
GPU: NVIDIA GeForce GTX 1050 Ti
Memory: 2420MiB / 24043MiB