|
我用openbox+xmodmap的,其他按键都还好用...只有这四个播放控制的不好用,音量控制的都还好,但是有一次重启x后竟然神奇的好了一回,就一回,我也不知道碰哪了,之后又不行了
我用xev测试,这四个键只返回例如
- KeyRelease event, serial 35, synthetic NO, window 0x2a00001,
- root 0x58, subw 0x0, time 13812765, (-479,248), root:(616,556),
- state 0x0, keycode 172 (keysym 0x1008ff14, XF86AudioPlay), same_screen YES,
- XKeysymToKeycode returns keycode: 162
- XLookupString gives 0 bytes:
- XFilterEvent returns: False
复制代码
其他的有效键还会返回别的,例如
- FocusOut event, serial 35, synthetic NO, window 0x2a00001,
- mode NotifyGrab, detail NotifyAncestor
- FocusIn event, serial 35, synthetic NO, window 0x2a00001,
- mode NotifyUngrab, detail NotifyAncestor
- KeymapNotify event, serial 35, 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
- KeyRelease event, serial 35, synthetic NO, window 0x2a00001,
- root 0x58, subw 0x0, time 13777456, (2,491), root:(1097,799),
- state 0x0, keycode 123 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_scree
- n YES,
- XLookupString gives 0 bytes:
- XFilterEvent returns: False
复制代码
就是这四个键
- <keybind key="XF86AudioPlay">
- <action name="Execute">
- <execute>mpc toggle</execute>
- </action>
- </keybind>
- <keybind key="XF86AudioStop">
- <action name="Execute">
- <execute>mpc stop</execute>
- </action>
- </keybind>
- <keybind key="XF86AudioPrev">
- <action name="Execute">
- <execute>mpc prev</execute>
- </action>
- </keybind>
- <keybind key="XF86AudioNext">
- <action name="Execute">
- <execute>mpc next</execute>
- </action>
- </keybind>
复制代码 |
|