【问题标题】:Awesome WM ignores input in non-us layoutAwesome WM 忽略非我们布局中的输入
【发布时间】:2013-04-26 22:27:58
【问题描述】:

我已经开始使用 Awesome WM,发现当当前布局不是 US 时,它会忽略“运行”小部件 (mod+R) 中的输入,这很烦人, RU。此外,它会在其启动器/主菜单和“客户列表”等中忽略和任何 输入(鼠标点击、键盘 - 甚至不是 Esc 等特定于布局的键!)。 我正在使用 Arch Linux,~/.xinitrc 有以下行:

setxkbmap -layout "us, ru" -option "grp:caps_toggle, grp_led:caps"

Awesome 的 rc.lua 默认配置既没有布局,也没有特定于大写锁定的东西,但我试图隔离问题并从我的 xinitrc 中删除大写锁定切换选项。这根本没有帮助。

xev 输出显示,当我切换布局(使用大写锁定)时,唯一改变的是“状态”:

--鼠标左键点击(当前布局:美国,一切正常)--

LeaveNotify event, serial 33, synthetic NO, window 0x1600001,
    root 0x95, subw 0x0, time 13419931, (151,498), root:(835,518),
    mode NotifyGrab, detail NotifyAncestor, same_screen YES,
    focus YES, state 256

EnterNotify event, serial 33, synthetic NO, window 0x1600001,
    root 0x95, subw 0x0, time 13419931, (151,498), root:(835,518),
    mode NotifyUngrab, detail NotifyAncestor, same_screen YES,
    focus YES, state 256

KeymapNotify event, serial 33, synthetic NO, window 0x0,
    keys:  4294967189 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   

ButtonPress event, serial 33, synthetic NO, window 0x1600001,
    root 0x95, subw 0x0, time 13419931, (151,498), root:(835,518),
    state 0x0, button 1, same_screen YES

ButtonRelease event, serial 33, synthetic NO, window 0x1600001,
    root 0x95, subw 0x0, time 13420028, (151,498), root:(835,518),
    state 0x100, button 1, same_screen YES

-- 大写锁定(更改布局 US -> RU)--

KeyPress event, serial 33, synthetic NO, window 0x1600001,
    root 0x95, subw 0x0, time 13420911, (151,498), root:(835,518),
    state 0x0, keycode 66 (keysym 0xfe08, ISO_Next_Group), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x1600001,
    root 0x95, subw 0x0, time 13420998, (151,498), root:(835,518),
    state 0x2000, keycode 66 (keysym 0xfe08, ISO_Next_Group), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

-- 鼠标左键点击(现在 Awesome 在其小部件/对话框/...中看不到鼠标点击)--

LeaveNotify event, serial 33, synthetic NO, window 0x1600001,
    root 0x95, subw 0x0, time 13422624, (151,498), root:(835,518),
    mode NotifyGrab, detail NotifyAncestor, same_screen YES,
    focus YES, state 8448

EnterNotify event, serial 33, synthetic NO, window 0x1600001,
    root 0x95, subw 0x0, time 13422625, (151,498), root:(835,518),
    mode NotifyUngrab, detail NotifyAncestor, same_screen YES,
    focus YES, state 8448

KeymapNotify event, serial 33, synthetic NO, window 0x0,
    keys:  4294967189 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   

ButtonPress event, serial 33, synthetic NO, window 0x1600001,
    root 0x95, subw 0x0, time 13422624, (151,498), root:(835,518),
    state 0x0, button 1, same_screen YES

ButtonRelease event, serial 33, synthetic NO, window 0x1600001,
    root 0x95, subw 0x0, time 13422721, (151,498), root:(835,518),
    state 0x2100, button 1, same_screen YES

-- 大写锁定(更改布局 RU -> US)--

KeyPress event, serial 33, synthetic NO, window 0x1600001,
    root 0x95, subw 0x0, time 13423836, (151,498), root:(835,518),
    state 0x2000, keycode 66 (keysym 0xfe08, ISO_Next_Group), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x1600001,
    root 0x95, subw 0x0, time 13423947, (151,498), root:(835,518),
    state 0x0, keycode 66 (keysym 0xfe08, ISO_Next_Group), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

-- 转义(例如,关闭 awesome 的主菜单)--

KeyPress event, serial 33, synthetic NO, window 0x1600001,
    root 0x95, subw 0x0, time 13426419, (151,498), root:(835,518),
    state 0x0, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
    XLookupString gives 1 bytes: (1b) ""
    XmbLookupString gives 1 bytes: (1b) ""
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x1600001,
    root 0x95, subw 0x0, time 13426514, (151,498), root:(835,518),
    state 0x0, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
    XLookupString gives 1 bytes: (1b) ""
    XFilterEvent returns: False

-- 大写锁定(更改布局 US -> RU)--

KeyPress event, serial 33, synthetic NO, window 0x1600001,
    root 0x95, subw 0x0, time 13427017, (151,498), root:(835,518),
    state 0x0, keycode 66 (keysym 0xfe08, ISO_Next_Group), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x1600001,
    root 0x95, subw 0x0, time 13427096, (151,498), root:(835,518),
    state 0x2000, keycode 66 (keysym 0xfe08, ISO_Next_Group), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

-- 转义(忽略)--

KeyPress event, serial 33, synthetic NO, window 0x1600001,
    root 0x95, subw 0x0, time 13427782, (151,498), root:(835,518),
    state 0x2000, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
    XLookupString gives 1 bytes: (1b) ""
    XmbLookupString gives 1 bytes: (1b) ""
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x1600001,
    root 0x95, subw 0x0, time 13427877, (151,498), root:(835,518),
    state 0x2000, keycode 9 (keysym 0xff1b, Escape), same_screen YES,
    XLookupString gives 1 bytes: (1b) ""
    XFilterEvent returns: False

P.S.:我也想知道在哪里可以找到 awesome 的关键缩写(例如 Shift_R)以及这些 Mod1、Mod2 等的确切含义。

UPD:这与this question 中描述的问题基本相同,但作者只说大写锁定切换,而不是默认(Alt-Shift)切换。

【问题讨论】:

    标签: keyboard-layout awesome-wm


    【解决方案1】:

    【讨论】:

    • 而最简单的解决方案是将xorg-xkbcomp降级到1.2.3版
    • 最简单的解决方案实际上是编辑 /usr/share/X11/xkb/compat/basic 并删除或注释掉“组 [2-4] = AltGr;”行(所有三个)。通过此 X11 错误报告答案中的链接找到。
    【解决方案2】:

    我在此处复制对已接受答案的评论以提高可见性。

    解决方法是编辑文件/usr/share/X11/xkb/compat/basic 并删除或注释掉这些行:

    group 2 = AltGr;
    group 3 = AltGr;
    group 4 = AltGr;
    

    如建议here

    【讨论】:

      猜你喜欢
      • 2022-12-25
      • 2011-07-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-31
      • 2020-09-24
      相关资源
      最近更新 更多