Re: multimedia keyboards

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Matt Graham
Date:  
To: plug-discuss
Subject: Re: multimedia keyboards
After a long battle with technology, Nathan Aubrey wrote:
> I just acquired a new keyboard and its got some nice fancy keys on it,
> volume control and whatnot. How to I configure these to work in KDE?
> Its also got a bunch of extra buttons like back,forward,refresh,stop
> mail,mycomputer,home and I'd like to do something with them.


xbindkeys or gtk-xbindkeys, possibly combined with xmacroplay (
http://xmacro.sourceforge.net/ ). I've written extensively on this topic in
comp.os.linux.x. Basically:

xbindkeys -k
(press non-standard key, get:)
"NoCommand"
m: 0x0 + c:195

(this means the non-standard key has no command bound to it, has no modifiers,
and keycode 195)

Alter the lines xbindkeys -k spits out to read:
"/home/me/bin/dosomething.sh &"
m:0x0 + c:195

...add this to your ~/.xbindkeysrc . Then set up ~/bin/dosomething.sh like
so:

#!/bin/bash
echo -e "KeyStrPress Alt_L\nKeyStrPress Left\nKeyStrRelease Left\n\
KeyStrRelease Alt_L" | xmacroplay :0
# end, make sure to chmod+x it

...finally, start xbindkeys or kill -TERM it and restart it if it's already
running. Now pressing the odd key will send Alt+Left to the X server,
meaning it's become the "back" key in Firefox/Konqueror.

The frontend gtk-xbindkeys may make it a tad easier to set stuff up. If
you're not running compiz/beryl/compiz-fusion, you can use wmctrl in the
shell scripts that xbindkeys launches to do things like "if a kcalc is
running, send it to the current virtual desktop and activate it. If no kcalc
is running, start one." This can be very useful/nifty. HTH,

--
People don't tend to get paid.
--MegaHAL, trained on Netizen's quotes file
There is no Darkness in Eternity/But only Light too dim for us to see
---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change your mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss