You are not logged in.
When I run sudo showkey, turn my volume wheel left, right, then press mute, I get this:
[mark@linbin ~]$ sudo showkey
kb mode was RAW
[ if you are trying this under X, it might not work
since the X server is also reading /dev/console ]
press any key (program terminates 10s after last keypress)...
keycode 28 release
keycode 114 press
keycode 114 release
keycode 115 press
keycode 115 release
keycode 113 press
keycode 113 release
So I made this script:
[mark@linbin ~]$ cat .xbindkeysrc
"amixer set PCM 3%-"
m:0x10 + c:114
Mod2 + NoSymbol
"amixer set PCM 3%+"
m:0x10 + c:115
Mod2 + NoSymbol
"amixer set PCM toggle"
m:0x10 + c:113
Mod2 + NoSymbol
But when I run xbindkeys, the right arrow key makes the volue lower and the left arrow button toggles mute/unmute. I'm not sure about what makes the volume increase, but regardless, either showkeys or xbindkeys isn't following the scancodes correctly I think. What should I do from here?
Offline
I just realized that I'm experiencing the same problem with my (modern) laptop. I suppose and update caused this, because my old script worked until now. None of my hotkeys work. This is my current, unchanged ~/.xbindkeysrc, regardless of the current issue (this used to work):
# vol mute
"amixer set Master mute"
m:0x10 + c:160
# vol up
"amixer set Master 2dB+ unmute"
m:0x10 + c:176
# vol dn
"amixer set Master 2dB- unmute"
m:0x10 + c:174
# suspend
"sudo pm-suspend"
m:0x10 + c:223
Offline
There is a bit of terminological confusion. The scancodes are at the kernel level and you can see them running from console 'showkey -s'.
Plain 'showkey' shows the keycodes, but you can check them from inside X with xev.
Another important thing is that the latest xorg upgrade attributed a keysymname to many hotkeys in the keyboards, so perhaps your hotkeys have already a keysymname and you should use it in .xbindkeysrc. You can check this in xev too.
Last edited by patroclo7 (2008-12-23 11:44:28)
Mortuus in anima, curam gero cutis
Offline
Okay, so the keycodes changed xev told me so. Thank you for clearing that up.
One more thing though ... my sleep button isn't making xev do anything. it's Fn + F3, and if I press F3, a keycode pops up, but Fn + F3 doesn't do anything. Fn + PgUp (vol up) and Fn + PgDn (vol dn) are recognized by xev though. Any thoughts?
Offline
Go in the console with Ctrl + Alt + F1, launch 'showkey -s' and see if something is printed out. If not, there is nothing to do, since the key combination is not seen at the kernel level. If a scancode is printed out, you can bind it to a keycode.
Mortuus in anima, curam gero cutis
Offline