Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: DXR3 support patch for vdr-1.1.5
Klaus Schmidinger wrote:
>>This example shows the current config:
>># program-key remote-key
>>vdr-menu-up UP
>>vdr-menu-down DOWN
>>mplayer-menu-up 2
>>mplayer-menu-down 8
>>
>>Now Klaus and me could change it to:
>># program-key remote-key
>>vdr-menu-up UP
>>vdr-menu-down DOWN
>>mplayer-menu-up UP
>>mplayer-menu-down DOWN
>>
>>That way all the differrent keys in all menus could be changed.
>
>
> Please help me if I'm missing something here: why should the *same* function
> be assigned to *different* keys in the various parts of a program?
> Wouldn't the user expect the "Up" function to be always on the same key?
>
Surely - most time the same same key should do the same. But there can always be
a reason why not.
So wouldn't it be possible to create a config file, where all vdr-relevant keys
can be assigned to the IR-command the user wants to use for it ? It also should
be possible to assign more than one IR command to same vdr function.
e.g. in lircd.conf are UP,DOWN,LEFT,RIGHT...
then in the lircvdr-conf file you assign:
vdr-menu-up
UP,RIGHT
vdr-menu-down
DOWN,LEFT
mplayer-menu-up
UP
mplayer-menu-down
DOWN
and in your code plugin code you just have to ask for :
if InputKey() == GetKey( vdr-menu-up ) then ...
You just need to universal functions for it: one to read the key(InputKey) and
another one(GetKey) which returns the defintion of key from the conf file.
So new keys could easily be added, by just entering a new line to the conf file.
I hope you can understand what I wrote in my kitchen english, but from my point
of view, this should be the way to go :-)
--
Helmut Auer, helmut@helmutauer.de
Home |
Main Index |
Thread Index