Hi,
Simon Baxter wrote:
Hi Richard - can you help me with a mod to your patch??
^^^^^^^
Reinhard!
I've been trying to add 2 User keys as a modification to Richard's patch below.
Instead of using 1 & 3 to skip 10 seconds, want to use User1 and User2 +#define kEditJumpBack kUser1 +#define kEditJumpForward kUser2
why doesn't this work??
Have a look into vdr.c (~ line 707) for this line:
case kUser1 ... kUser9: cRemote::PutMacro(key); key = kNone; break;
So the user keys just get translated into the defined macros and are afterwards deleted (= set to kNone).
Bye.
Simon Baxter wrote:
Hi Richard - can you help me with a mod to your patch??
^^^^^^^
Reinhard!
sorry about that - :(
I've been trying to add 2 User keys as a modification to Richard's patch below.
Instead of using 1 & 3 to skip 10 seconds, want to use User1 and User2 +#define kEditJumpBack kUser1 +#define kEditJumpForward kUser2
why doesn't this work??
Have a look into vdr.c (~ line 707) for this line:
case kUser1 ... kUser9: cRemote::PutMacro(key); key = kNone; break;
So the user keys just get translated into the defined macros and are afterwards deleted (= set to kNone).
So how can I add 2 new ( |< and >| ) keys, and map to a function? 1) add ~line 25 in keys.h kNext, kPrevious, or +#define kNext ?? +#define kPrevious ?? ?which 2) add ~line 3723 in menu.c + case kPrevious|k_Repeat: + case kPrevious: SkipSeconds(-10); break; + case kNext|k_Repeat: + case kNext: SkipSeconds( 10); break;
3) add the 'learning' functions of the |< and >| keys to map to kNext and kPrevious How do I do this?
Reinhard Nissl wrote:
Have a look into vdr.c (~ line 707) for this line:
case kUser1 ... kUser9: cRemote::PutMacro(key); key = kNone; break;
So the user keys just get translated into the defined macros and are afterwards deleted (= set to kNone).
This would be a nice extension of the current implementation:
case kUser1 ... kUser9: if (KeyMacros.Get(key)) { cRemote::PutMacro(key); key = kNone; } break;
eg. if there is no macro assigned to that key, keep the key code for plugins and other extensions.
(the code is not tested, don't blame be if it doesn't work...)
Cheers,
Udo
Udo wrote:
This would be a nice extension of the current implementation:
case kUser1 ... kUser9: if (KeyMacros.Get(key)) { cRemote::PutMacro(key); key = kNone; } break;
eg. if there is no macro assigned to that key, keep the key code for plugins and other extensions.
(the code is not tested, don't blame be if it doesn't work...)
Looks good to me
I'll try it out...
This would be a nice extension of the current implementation:
case kUser1 ... kUser9: if (KeyMacros.Get(key)) { cRemote::PutMacro(key); key = kNone; } break;
eg. if there is no macro assigned to that key, keep the key code for plugins and other extensions.
(the code is not tested, don't blame be if it doesn't work...)
Looks good to me
I'll try it out...
Works under skincurses - will try the OSD tonight.....
This would be a nice extension of the current implementation:
case kUser1 ... kUser9: if (KeyMacros.Get(key)) { cRemote::PutMacro(key); key = kNone; } break;
eg. if there is no macro assigned to that key, keep the key code for plugins and other extensions.
(the code is not tested, don't blame be if it doesn't work...)
Looks good to me
I'll try it out...
Works under skincurses - will try the OSD tonight.....
Works just FINE !!! my |< and >| keys are now 10 second skip forward and back.....
Thanks Udo !!