[mythtv-users] Using extra keys in a keyboard
R. G. Newbury
newbury at mandamus.org
Wed May 21 22:23:48 UTC 2008
Steve Peters - Priority Electronics wrote:
>> JCA wrote:
>>> I use an RF wireless keyboard to control my MythTV box. This
>>> keyboard comes with a plethora of extra keys and buttons all over the
>>> place which, when pressed, are totally ignored by MythTV.
>> What I would
>>> like to do is to map the actions of those keys on to MythTV actions.
>>> For instance, I have two buttons (not to be confused with the usual
>>> arrow keys) one labeled with an up arrow and the other with a down
>>> arrow, that I would like to map on to the MythTV volume increase and
>>> decrease functions. Anybody know how this can be done? I seem to
>>> recall coming across a HOWTO along such lines, but I can't
>> find it :-(
>>> mythtv-users mailing list
>>> mythtv-users at mythtv.org
>> Don't have any detailed instructions for you, but you might start by
>> googling "lineak". Which is an app for linux to help you map key press
>> events. After X recognizing the key press events you can use Myth's
>> keybinding editor to map them.
> If all else fails, you could use xbindkeys and then have it run a script
> that uses telnet to change the volume. Xbindkeys is great at getting all
> those random keys that other programs just ignore.
> So press "arrow down", which will run script1.sh, script1.sh tells myth to
> change volume down through the telnet command. This is only a worst case
> senario in case you can't figure out any other way.
You might want to start by using xev which tells you what any keypress
actually sends. Then you could use xmodmap to map any particular
keypress to another action/key which is then mapped into myth with the
keybinding editor. Once this is done the only 'extra' step is to run
xmodmap in rc.local or somewhere on boot to insert your re-mapped key
mappings into use.
Works with the extra keys on my Logitech DiNovo keyboards, and works to
re-map the control and caps-lock keys on this laptop. Note that this
route will not make a program accept a keycode which it does not already
accept, but it does allow you to remap an un-used key into something
more useful, such as, in your case, the 'down-arrow into 'volume-down'
and 'up-arrow' into 'volume-up'.
You *are* aware that that '[' and ']' already do that?
More information about the mythtv-users