LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 717|回复: 2

升级Xorg后多媒体键的问题

[复制链接]
发表于 2009-4-28 16:16:59 | 显示全部楼层 |阅读模式
我用openbox+xmodmap的,其他按键都还好用...只有这四个播放控制的不好用,音量控制的都还好,但是有一次重启x后竟然神奇的好了一回,就一回,我也不知道碰哪了,之后又不行了

我用xev测试,这四个键只返回例如
  1. KeyRelease event, serial 35, synthetic NO, window 0x2a00001,
  2.     root 0x58, subw 0x0, time 13812765, (-479,248), root:(616,556),
  3.     state 0x0, keycode 172 (keysym 0x1008ff14, XF86AudioPlay), same_screen YES,
  4.     XKeysymToKeycode returns keycode: 162
  5.     XLookupString gives 0 bytes:
  6.     XFilterEvent returns: False
复制代码


其他的有效键还会返回别的,例如
  1. FocusOut event, serial 35, synthetic NO, window 0x2a00001,
  2.     mode NotifyGrab, detail NotifyAncestor

  3. FocusIn event, serial 35, synthetic NO, window 0x2a00001,
  4.     mode NotifyUngrab, detail NotifyAncestor

  5. KeymapNotify event, serial 35, synthetic NO, window 0x0,
  6.     keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
  7.            0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

  8. KeyRelease event, serial 35, synthetic NO, window 0x2a00001,
  9.     root 0x58, subw 0x0, time 13777456, (2,491), root:(1097,799),
  10.     state 0x0, keycode 123 (keysym 0x1008ff13, XF86AudioRaiseVolume), same_scree
  11. n YES,
  12.     XLookupString gives 0 bytes:
  13.     XFilterEvent returns: False
复制代码


就是这四个键
  1.     <keybind key="XF86AudioPlay">
  2.       <action name="Execute">
  3.         <execute>mpc toggle</execute>
  4.       </action>
  5.     </keybind>
  6.     <keybind key="XF86AudioStop">
  7.       <action name="Execute">
  8.         <execute>mpc stop</execute>
  9.       </action>
  10.     </keybind>
  11.     <keybind key="XF86AudioPrev">
  12.       <action name="Execute">
  13.         <execute>mpc prev</execute>
  14.       </action>
  15.     </keybind>
  16.     <keybind key="XF86AudioNext">
  17.       <action name="Execute">
  18.         <execute>mpc next</execute>
  19.       </action>
  20.     </keybind>
复制代码
发表于 2009-4-28 17:52:17 | 显示全部楼层
我本来也是xmodmap的, 升级xorg到1.6之后, 忽然有一次发现volume down没了
后来就发现keycode发生了变化. 就是把键映射错了. 把volume down映射成Audio***了.

于是我把xmodmap去掉了. 所有多媒体键都好用了.
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-4-28 18:45:02 | 显示全部楼层
Post by yangzhe1990;1980694
我本来也是xmodmap的, 升级xorg到1.6之后, 忽然有一次发现volume down没了
后来就发现keycode发生了变化. 就是把键映射错了. 把volume down映射成Audio***了.

于是我把xmodmap去掉了. 所有多媒体键都好用了.


我那次也是没启动xmodmap,难道....等我试一下

果然...现在xev的反映恢复了..不明白,xorg现在可以自动识别,以前应该也可以,但是为什么调音量的怎样都好用,控制播放的自定义就废掉呢?

  1. FocusOut event, serial 35, synthetic NO, window 0x1800001,
  2.     mode NotifyGrab, detail NotifyAncestor

  3. FocusIn event, serial 35, synthetic NO, window 0x1800001,
  4.     mode NotifyUngrab, detail NotifyAncestor

  5. KeymapNotify event, serial 35, synthetic NO, window 0x0,
  6.     keys:  2   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   
  7.            0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

  8. KeyRelease event, serial 35, synthetic NO, window 0x1800001,
  9.     root 0x58, subw 0x0, time 23237473, (492,48), root:(541,356),
  10.     state 0x0, keycode 172 (keysym 0x1008ff14, XF86AudioPlay), same_screen YES,
  11.     XLookupString gives 0 bytes:
  12.     XFilterEvent returns: False
复制代码
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表