我想wheel up
和wheel 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"
我在 ssh 上使用从 Centos(X 服务器和 X 客户端)到 Ubuntu(X 客户端)的 XForwarding。
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
+2
和Mode_switch
+被识别为,和,但+和+是和。3
button1
button2
button3
Mode_switch
4
Mode_switch
5
Pointer_Button4
Pointer_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 up
并wheel down
通过鼠标正确工作。