Global Long Key Presses (TV/1106)?

Support forum for extenders. If you're having trouble getting one up and running, this is the place to come.

Moderator: Moderators

Post Reply
Hlorri
Posts: 9
Joined: Sat Mar 26, 2005 4:00 am
Location: Castro Valley, CA

Global Long Key Presses (TV/1106)?

Post by Hlorri »

I have a URC-6131 w/JP1 and 8K EPROM, running the 6131 extender.

I have programmed a macro into the "shifted" version of each device button (CBL/SAT, DVD, VCR, AUD) to switch to the corresponding device. For instance, <SET> + <SAT/CBL> switches my TV to component input 1 (from the cable box), and my HT system to the auxillary sound input (also from my cable box).

Then, I discovered the LKP device in the extender (TV/1106), and decided to have some fun with it. Basically, I want:
- a short press on each device button to behave like the unextended device buttons, i.e. to only set the device mode of the remote control
- a long press on each device button to run my Shift-<button> macros, as described above.

Similarly, I want a short press on the Power button to switch on/off only the current device, and a long press to switch off all devices (much like the original 6131 power macro).

The problem I face is that the LKP protocol is local to each device mode. So while the remote is controlling the CBL/SAT device, I need one TV/1106 keymove for each device button, another set of keymoves for the DVD mode, and so on.

As an example, to get the desired short/long device press for the "CBL/SAT" button, I currently have:

Code: Select all

   Device     Key        ->  Code       Hex Command           Notes
   TV         CBL/SAT    ->  TV/1106    $42 $60 $62 $89       Short: T_SAT O_SAT; Long: Shift-CBL/SAT
   CBL/SAT    CBL/SAT    ->  TV/1106    $42 $60 $62 $89       Short: T_SAT O_SAT; Long: Shift-CBL/SAT
   PVR        CBL/SAT    ->  TV/1106    $42 $60 $62 $89       Short: T_SAT O_SAT; Long: Shift-CBL/SAT
   AUD        CBL/SAT    ->  TV/1106    $42 $60 $62 $89       Short: T_SAT O_SAT; Long: Shift-CBL/SAT
   VCR        CBL/SAT    ->  TV/1106    $42 $60 $62 $89       Short: T_SAT O_SAT; Long: Shift-CBL/SAT
   DVD        CBL/SAT    ->  TV/1106    $42 $60 $62 $89       Short: T_SAT O_SAT; Long: Shift-CBL/SAT
All in all, I currently have 42 keymoves (6 control modes * 6 device buttons, plus 6 control modes * power) associated with this functionality. While this works, I would love to be able to eliminate this duplicated code/byte usage.

Ideas, anyone?
mtakahar
Expert
Posts: 281
Joined: Sun Aug 03, 2003 2:46 pm

Post by mtakahar »

Keep only one of these key moves and create a regular macro with an X_ command to swtich to the device then execute the key move.
There's an example in the LDKP readme file.

Hal
Hlorri
Posts: 9
Joined: Sat Mar 26, 2005 4:00 am
Location: Castro Valley, CA

Thanks!

Post by Hlorri »

Thank you, Hal!

For some reason, I had assumed that a LKP key could not be executed from within a macro (perhaps after a half-hearted attempt at getting this to work at some point in the past).

I now did what you suggested, and it works great! My device buttons now execute macros like:
SAT/CBL -> <T_SAT> <O_SAT> <Shift-CBL/SAT>

In turn, the shifted version of these now contain LKP functions to set up inputs/outputs for the corresponding unit (essentially replacing my previous macros):
Shift-SAT/CBL -> [TV/1106] $40 $63 $D5 $73 $13 $93 $6B $1F $15 $07 $7F

However, the one remaining issue is the Power button. I cannot get a "short" press to send a power signal to the active unit using this method, because the LKP is bound to a specific device button (I use the "PVR" button, but it could just as easily be one of the phantom "dev7" or "dev8" buttons), so the macro will look like this:
Power -> <X_PVR> <Shift-Power> <X_Cancel>

In essence, a short press will send a power signal to the PVR device, no matter which device is currently active.

So, I am still stuck with the following keymoves for the Power button:

Code: Select all

DEVICE   BUTTON  ->  SETUP CODE   HEX COMMAND
TV       Power   ->  TV/1106      $41 $83 $63 $83 $5F $83 $6B $83 $7F
CBL/SAT  Power   ->  TV/1106      $41 $83 $63 $83 $5F $83 $6B $83 $7F
PVR      Power   ->  TV/1106      $41 $83 $63 $83 $5F $83 $6B $83 $7F
VCR      Power   ->  TV/1106      $41 $83 $63 $83 $5F $83 $6B $83 $7F
DVD      Power   ->  TV/1106      $43 $6B $83 $7F $63 $83 $5F $83 $6B $83 $7F
AUD      Power   ->  TV/1106      $43 $6B $83 $7F $63 $83 $5F $83 $6B $83 $7F
(In DVD and AUD mode, I execute VCR->Power, since these three modes actually control the same physical Home Theatre box).

In any case, thanks a lot for your reply - it did help quite a bit!

Tor
mtakahar
Expert
Posts: 281
Joined: Sun Aug 03, 2003 2:46 pm

Post by mtakahar »

Adding X_Cancel before the shift-power on the short side doesn't work?

You could save some more space by assigning the long side sequence to a phantom key then put the phantom key in the long side.

Hal
Hlorri
Posts: 9
Joined: Sat Mar 26, 2005 4:00 am
Location: Castro Valley, CA

Post by Hlorri »

Duh.

Sorry for these inane questions - I really ought to take a step back and look at the problem from different angles now and then.

Yes, I suppose a X_Cancel would work right-before the Power button in the short key sequence. I'll try it now.

OTOH, I am not sure which is less "ugly": Repeating the LKP code for the same button in all modes, as I have done, or breaking good encapsulation practices by embedding an X_Cancel code for a X_<device> selection done outside the context of the LKF. The latter sort of reminds me of "GOTO" statements from the Bad Old Days of BASIC programming... :?

(I guess such scruples are the reason I'm not where Bill Gates is today.. :roll: )
Post Reply