窗户钥匙大约每天停止工作一次

窗户钥匙大约每天停止工作一次

有时,Window 键(用作超级键)会停止触发通常的桌面操作。

通常它运行良好,但每天有一两次它似乎会停止工作。

如果我打开 Gnome Tweaks->键盘和鼠标->其他布局选项并勾选和取消勾选任何复选框,则 Window 键会再次开始工作。该解决方法在Gnome shell:按超级键不起作用

但这个错误每天都会再次出现,这很烦人。有什么建议可以解释一下这是什么原因造成的吗?

Ubuntu 20.04,Gnome3 桌面。使用 dconf 重新映射了 ESC 和 CapsLock,但没有进行其他键盘映射调整。

我安装了终端仿真器 kitty昨天,每次我启动 kitty 时,Window 键似乎都会停止工作。所以这是一种可靠地触发故障的方法,但它甚至在我安装 kitty 之前就发生了。

当我启动 kitty 时,我在 journalctl 中看到这些消息:

Sep 09 08:40:18 dannas--dell-xp-15 gnome-shell[8127]: Window manager warning: Overwriting existing binding of keysym 31 with keysym 31 (keycode a).
Sep 09 08:40:18 dannas--dell-xp-15 gnome-shell[8127]: Window manager warning: Overwriting existing binding of keysym 32 with keysym 32 (keycode b).
Sep 09 08:40:18 dannas--dell-xp-15 gnome-shell[8127]: Window manager warning: Overwriting existing binding of keysym 33 with keysym 33 (keycode c).
Sep 09 08:40:18 dannas--dell-xp-15 gnome-shell[8127]: Window manager warning: Overwriting existing binding of keysym 34 with keysym 34 (keycode d).
Sep 09 08:40:18 dannas--dell-xp-15 gnome-shell[8127]: Window manager warning: Overwriting existing binding of keysym 35 with keysym 35 (keycode e).
Sep 09 08:40:18 dannas--dell-xp-15 gnome-shell[8127]: Window manager warning: Overwriting existing binding of keysym 36 with keysym 36 (keycode f).
Sep 09 08:40:18 dannas--dell-xp-15 gnome-shell[8127]: Window manager warning: Overwriting existing binding of keysym 38 with keysym 38 (keycode 11).
Sep 09 08:40:18 dannas--dell-xp-15 gnome-shell[8127]: Window manager warning: Overwriting existing binding of keysym 39 with keysym 39 (keycode 12).
Sep 09 08:40:18 dannas--dell-xp-15 gnome-shell[8127]: Window manager warning: Overwriting existing binding of keysym 37 with keysym 37 (keycode 10).
Sep 09 08:40:18 dannas--dell-xp-15 gnome-shell[8127]: Window manager warning: Overwriting existing binding of keysym 31 with keysym 31 (keycode a).
Sep 09 08:40:18 dannas--dell-xp-15 gnome-shell[8127]: Window manager warning: Overwriting existing binding of keysym 32 with keysym 32 (keycode b).
Sep 09 08:40:18 dannas--dell-xp-15 gnome-shell[8127]: Window manager warning: Overwriting existing binding of keysym 33 with keysym 33 (keycode c).
Sep 09 08:40:18 dannas--dell-xp-15 gnome-shell[8127]: Window manager warning: Overwriting existing binding of keysym 34 with keysym 34 (keycode d).
Sep 09 08:40:18 dannas--dell-xp-15 gnome-shell[8127]: Window manager warning: Overwriting existing binding of keysym 35 with keysym 35 (keycode e).
Sep 09 08:40:18 dannas--dell-xp-15 gnome-shell[8127]: Window manager warning: Overwriting existing binding of keysym 36 with keysym 36 (keycode f).
Sep 09 08:40:18 dannas--dell-xp-15 gnome-shell[8127]: Window manager warning: Overwriting existing binding of keysym 38 with keysym 38 (keycode 11).
Sep 09 08:40:18 dannas--dell-xp-15 gnome-shell[8127]: Window manager warning: Overwriting existing binding of keysym 39 with keysym 39 (keycode 12).
Sep 09 08:40:18 dannas--dell-xp-15 gnome-shell[8127]: Window manager warning: Overwriting existing binding of keysym 37 with keysym 37 (keycode 10).
Sep 09 08:40:18 dannas--dell-xp-15 gnome-shell[8127]: Window manager warning: Overwriting existing binding of keysym 31 with keysym 31 (keycode a).
Sep 09 08:40:18 dannas--dell-xp-15 gnome-shell[8127]: Window manager warning: Overwriting existing binding of keysym 32 with keysym 32 (keycode b).
Sep 09 08:40:18 dannas--dell-xp-15 gnome-shell[8127]: Window manager warning: Overwriting existing binding of keysym 33 with keysym 33 (keycode c).
Sep 09 08:40:18 dannas--dell-xp-15 gnome-shell[8127]: Window manager warning: Overwriting existing binding of keysym 34 with keysym 34 (keycode d).
Sep 09 08:40:18 dannas--dell-xp-15 gnome-shell[8127]: Window manager warning: Overwriting existing binding of keysym 35 with keysym 35 (keycode e).
Sep 09 08:40:18 dannas--dell-xp-15 gnome-shell[8127]: Window manager warning: Overwriting existing binding of keysym 36 with keysym 36 (keycode f).
Sep 09 08:40:18 dannas--dell-xp-15 gnome-shell[8127]: Window manager warning: Overwriting existing binding of keysym 38 with keysym 38 (keycode 11).
Sep 09 08:40:18 dannas--dell-xp-15 gnome-shell[8127]: Window manager warning: Overwriting existing binding of keysym 39 with keysym 39 (keycode 12).
Sep 09 08:40:18 dannas--dell-xp-15 gnome-shell[8127]: Window manager warning: Overwriting existing binding of keysym 37 with keysym 37 (keycode 10).
$ cat /etc/default/keyboard 
# KEYBOARD CONFIGURATION FILE

# Consult the keyboard(5) manual page.

XKBMODEL="pc105"
XKBLAYOUT="se"
XKBVARIANT=""
XKBOPTIONS=""

BACKSPACE="guess"

无论我在 Windows 键有效时还是无效时运行该命令,此命令都是相同的。

$ gsettings get org.gnome.desktop.input-sources xkb-options
['caps:swapescape']

当 Windows 键不起作用时,我运行 xev 并按下该键,得到以下输出:

$ xev
...
KeyPress event, serial 37, synthetic NO, window 0x6200001,
    root 0x5f5, subw 0x0, time 8173867, (165,-14), root:(2113,44),
    state 0x0, keycode 133 (keysym 0xffe3, Control_L), same_screen YES,
    XKeysymToKeycode returns keycode: 37
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 37, synthetic NO, window 0x6200001,
    root 0x5f5, subw 0x0, time 8173995, (165,-14), root:(2113,44),
    state 0x4, keycode 133 (keysym 0xffe3, Control_L), same_screen YES,
    XKeysymToKeycode returns keycode: 37
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

当 Windows 键工作时,我得到:

$ xev
...
FocusOut event, serial 37, synthetic NO, window 0x6200001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 37, synthetic NO, window 0x6200001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 37, synthetic NO, window 0x0,
    keys:  4294967169 0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

FocusOut event, serial 37, synthetic NO, window 0x6200001,
    mode NotifyGrab, detail NotifyNonlinear

FocusIn event, serial 37, synthetic NO, window 0x6200001,
    mode NotifyUngrab, detail NotifyNonlinear

KeymapNotify event, serial 37, synthetic NO, window 0x0,
    keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0 

一份简单但全面的 Linux xkb 指南我对 xkb 系统有了更多的了解。当 Windows 键工作时,我看到:

$ 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:      pc105
layout:     se,us
variant:    ,
options:    caps:swapescape
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+se+us:2+inet(evdev)+capslock(swapescape)
geometry:   pc(pc105)
xkb_keymap {
    xkb_keycodes  { include "evdev+aliases(qwerty)" };
    xkb_types     { include "complete"  };
    xkb_compat    { include "complete"  };
    xkb_symbols   { include "pc+se+us:2+inet(evdev)+capslock(swapescape)"   };
    xkb_geometry  { include "pc(pc105)" };
};

当 Windows 键不起作用时,我看到 altwin(ctrl_win)、capslock(swapescape)和 deterministic(ctrl_alt_bksp)已启用。

$ 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:      pc105
layout:     se,us
variant:    ,
options:    terminate:ctrl_alt_bksp,altwin:ctrl_win,terminate:ctrl_alt_bksp,caps:swapescape
Trying to build keymap using the following components:
keycodes:   evdev+aliases(qwerty)
types:      complete
compat:     complete
symbols:    pc+se+us:2+inet(evdev)+altwin(ctrl_win)+capslock(swapescape)+terminate(ctrl_alt_bksp)
geometry:   pc(pc105)
xkb_keymap {
    xkb_keycodes  { include "evdev+aliases(qwerty)" };
    xkb_types     { include "complete"  };
    xkb_compat    { include "complete"  };
    xkb_symbols   { include "pc+se+us:2+inet(evdev)+altwin(ctrl_win)+capslock(swapescape)+terminate(ctrl_alt_bksp)" };
    xkb_geometry  { include "pc(pc105)" };
};

过去我启用了 altwin(ctrl_win) 和 determinist(ctlr_alt_bksp),但现在不再启用了。我如何找到这些设置仍然存在的位置?我相信我最初使用 Gnome Tweak 工具设置了它们。

相关内容