gpt4 book ai didi

linux - 尽管 Pointer_Button1, 2, 3 工作,但 xmodmap 上的 Pointer_Button4, 5 不起作用

转载 作者:行者123 更新时间:2023-12-04 16:16:34 28 4
gpt4 key购买 nike

我要wheel upwheel down带键盘。

Pointer_Button1、Pointer_Button2 和 Pointer_Button3 在 xmodmap 上正常工作。
但是 Pointer_Button4 和 Pointer_Button5 不起作用。

我的一部分 .Xmodmap在下面。

pointer = 1 2 3 4 5
keycode 10 = 1 exclam Pointer_Button1
keycode 11 = 2 at Pointer_Button2
keycode 12 = 3 numbersign Pointer_Button3
keycode 13 = 4 dollar Pointer_Button4
keycode 14 = 5 percent Pointer_Button5


  • 然后按 Mode_switch + 1在键盘上,单击 left button在鼠标上正常工作。
  • 然后按 Mode_switch + 2在键盘上,单击 middle button在鼠标上正常工作。
  • 然后按 Mode_switch + 3在键盘上,单击 right button在鼠标上正常工作。


  • 然后按 Mode_switch + 4在键盘上,wheel up通过鼠标不起作用。
  • 然后按 Mode_switch + 5在键盘上,wheel down通过鼠标不起作用。

  • 环境:
    centos$ cat /etc/centos-release
    CentOS release 6.9 (Final)

    ubuntu$ cat /etc/lsb-release
    DISTRIB_ID=Ubuntu
    DISTRIB_RELEASE=16.04
    DISTRIB_CODENAME=xenial
    DISTRIB_DESCRIPTION="Ubuntu 16.04.4 LTS"

    我使用 XForwarding
    在 ssh 上从 Centos(X 服务器和 X 客户端)到 Ubuntu(X 客户端)。

    GNOME (2.28.2) 在 Centos 上运行,键盘映射在 Ubuntu 上加载。

    加载键盘映射:
    ubuntu$ xmodmap ~/.Xmodmap
    ubuntu$ xkbset m

    在这里我显示 xev 输出然后
  • Mode_switch键盘上。
  • 类型 1键盘上。
  • 类型 2键盘上。
  • 类型 3键盘上。
  • 类型 4键盘上。
  • 类型 5键盘上。
  • 发布 Mode_switch键盘上。
  • 点击 left button在鼠标上
  • 点击 middle button在鼠标上
  • 点击 right button在鼠标上
  • wheel up通过鼠标
  • wheel down通过鼠标
  • ubuntu$xev
    KeyPress event, serial 38, synthetic NO, window 0x4400001,
    root 0xa9, subw 0x0, time 2056786138, (114,87), root:(116,144),
    state 0x0, keycode 134 (keysym 0xff7e, Mode_switch), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

    PropertyNotify event, serial 38, synthetic NO, window 0x4400001,
    atom 0x18f (XKLAVIER_STATE), time 2056786139, state PropertyNewValue

    PropertyNotify event, serial 38, synthetic NO, window 0x4400001,
    atom 0x18f (XKLAVIER_STATE), time 2056786140, state PropertyNewValue

    ButtonPress event, serial 38, synthetic NO, window 0x4400001,
    root 0xa9, subw 0x0, time 2056796258, (114,87), root:(116,144),
    state 0x2000, button 1, same_screen YES

    ButtonRelease event, serial 38, synthetic NO, window 0x4400001,
    root 0xa9, subw 0x0, time 2056796362, (114,87), root:(116,144),
    state 0x2100, button 1, same_screen YES

    ButtonPress event, serial 38, synthetic NO, window 0x4400001,
    root 0xa9, subw 0x0, time 2056796882, (114,87), root:(116,144),
    state 0x2000, button 2, same_screen YES

    ButtonRelease event, serial 38, synthetic NO, window 0x4400001,
    root 0xa9, subw 0x0, time 2056797034, (114,87), root:(116,144),
    state 0x2200, button 2, same_screen YES

    ButtonPress event, serial 38, synthetic NO, window 0x4400001,
    root 0xa9, subw 0x0, time 2056797338, (114,87), root:(116,144),
    state 0x2000, button 3, same_screen YES

    ButtonRelease event, serial 38, synthetic NO, window 0x4400001,
    root 0xa9, subw 0x0, time 2056797450, (114,87), root:(116,144),
    state 0x2400, button 3, same_screen YES

    KeyPress event, serial 38, synthetic NO, window 0x4400001,
    root 0xa9, subw 0x0, time 2056797746, (114,87), root:(116,144),
    state 0x2000, keycode 13 (keysym 0xfeec, Pointer_Button4), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

    KeyRelease event, serial 38, synthetic NO, window 0x4400001,
    root 0xa9, subw 0x0, time 2056797842, (114,87), root:(116,144),
    state 0x2000, keycode 13 (keysym 0xfeec, Pointer_Button4), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

    KeyPress event, serial 38, synthetic NO, window 0x4400001,
    root 0xa9, subw 0x0, time 2056798810, (114,87), root:(116,144),
    state 0x2000, keycode 14 (keysym 0xfeed, Pointer_Button5), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

    KeyRelease event, serial 38, synthetic NO, window 0x4400001,
    root 0xa9, subw 0x0, time 2056798874, (114,87), root:(116,144),
    state 0x2000, keycode 14 (keysym 0xfeed, Pointer_Button5), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

    KeyRelease event, serial 38, synthetic NO, window 0x4400001,
    root 0xa9, subw 0x0, time 2056800250, (114,87), root:(116,144),
    state 0x2000, keycode 134 (keysym 0xff7e, Mode_switch), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

    PropertyNotify event, serial 38, synthetic NO, window 0x4400001,
    atom 0x18f (XKLAVIER_STATE), time 2056800251, state PropertyNewValue

    PropertyNotify event, serial 38, synthetic NO, window 0x4400001,
    atom 0x18f (XKLAVIER_STATE), time 2056800252, state PropertyNewValue

    ButtonPress event, serial 38, synthetic NO, window 0x4400001,
    root 0xa9, subw 0x0, time 2056802997, (114,87), root:(116,144),
    state 0x0, button 1, same_screen YES

    ButtonRelease event, serial 38, synthetic NO, window 0x4400001,
    root 0xa9, subw 0x0, time 2056803173, (114,87), root:(116,144),
    state 0x100, button 1, same_screen YES

    ButtonPress event, serial 38, synthetic NO, window 0x4400001,
    root 0xa9, subw 0x0, time 2056803901, (114,87), root:(116,144),
    state 0x0, button 2, same_screen YES

    ButtonRelease event, serial 38, synthetic NO, window 0x4400001,
    root 0xa9, subw 0x0, time 2056804077, (114,87), root:(116,144),
    state 0x200, button 2, same_screen YES

    ButtonPress event, serial 38, synthetic NO, window 0x4400001,
    root 0xa9, subw 0x0, time 2056804501, (114,87), root:(116,144),
    state 0x0, button 3, same_screen YES

    ButtonRelease event, serial 38, synthetic NO, window 0x4400001,
    root 0xa9, subw 0x0, time 2056804693, (114,87), root:(116,144),
    state 0x400, button 3, same_screen YES

    ButtonPress event, serial 38, synthetic NO, window 0x4400001,
    root 0xa9, subw 0x0, time 2056805949, (114,87), root:(116,144),
    / state 0x0, button 4, same_screen YES

    ButtonRelease event, serial 38, synthetic NO, window 0x4400001,
    root 0xa9, subw 0x0, time 2056805949, (114,87), root:(116,144),
    state 0x800, button 4, same_screen YES

    ButtonPress event, serial 38, synthetic NO, window 0x4400001,
    root 0xa9, subw 0x0, time 2056806909, (114,87), root:(116,144),
    state 0x0, button 5, same_screen YES

    ButtonRelease event, serial 38, synthetic NO, window 0x4400001,
    root 0xa9, subw 0x0, time 2056806909, (114,87), root:(116,144),
    state 0x1000, button 5, same_screen YES

    Mode_switch + 1 , Mode_switch + 2Mode_switch + 3键盘上被识别为 button1 , button2button3 ,但是 Mode_switch + 4Mode_switch + 5Pointer_Button4Pointer_Button5 .
    ubuntu$ xmodmap -pp
    There are 10 pointer buttons defined.

    Physical Button
    Button Code
    1 1
    2 2
    3 3
    4 4
    5 5
    6 6
    7 7
    8 8
    9 9
    10 10

    当然, wheel upwheel down通过鼠标正常工作。

    最佳答案

    找到了确切问题的解决方案。可能会帮助任何寻找相同的人。在/usr/share/X11/xkb/compat/mousekeys 验证您的文件。这个文件有 Pointer_Button1/2/3 的键符定义,但没有 4 和 5。继续添加
    Pointer_Button4 和 Pointer_Button5 类似于下面的 1/2/3。并获取包含 setxkbmap、xmodmap 命令的文件。现在你的 button4 和 5 应该可以工作了。

    interpret Pointer_Button4 {
    action= PointerButton(button=4);
    };
    interpret Pointer_Button5 {
    action= PointerButton(button=5);
    };

    关于linux - 尽管 Pointer_Button1, 2, 3 工作,但 xmodmap 上的 Pointer_Button4, 5 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49025098/

    28 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com