Page 1 of 1

How do I assign macros to long key presses on a 15-2117?

Posted: Tue Jan 13, 2004 9:22 pm
by markhs
I have a 15-2117 and am trying to assign a macro to a long key press of a device key. Is this the same as a shifted key?

I am very new at this so I apologize if this has been answered before.

Thanks for your help!!

Mark

Posted: Thu Jan 15, 2004 2:50 pm
by markhs
I understand that I get lkp functionality by using an extender. I have 15-2116ex2 installed and I have successfully created a few macros and favorites list.

I don't quite get how to assign a lkp code to a key. Can someone explain the steps involved or point me to a document explaining this?

Thanks!

Mark

Posted: Thu Jan 15, 2004 3:06 pm
by johann83
You need to create a keymove on the button you want to use as a LKP. The keymove should point to the LKP (MISC/1106, I think) device upgrade and use a hex command. For the hex command you enter the commands formatted for the LKP protocol. It is very helpful to use the ExtenderCodeCalc spreadsheet to calculate the hex commands.

A detailed description of how to set up a LKP should probably be in the extender Readme, but if it isn't I know it is in the Readme for the protocol itself, which is available here. Note that the LKP protocol included in the extender may not be exactly the same as that referenced here, so I would check the extender Readme first.

Hope this helps.

Matt

Posted: Thu Jan 15, 2004 3:42 pm
by Capn Trips
Having just done this relatively recently, I hope I can clarify. All is pretty well laid out in the LKP protocol readme file that comes with the extender.

First, a very useful tool is the extendercodecalc.xls spreadsheet, which helps generate the series of hex keycodes you need. Download it from the yahoo groups files section.

Then building the LKP series is pretty easy:
(0) Open the spreadsheet and select the appropriate extender on the first sheet;
(1) determine which sequence of button presses you desire for the SKP and for the LKP. You cannot use EFCs, OBCs, or even the Hex commands, you must use the BUTTONS (real, or Phantom, or shifted, or x_shifted but the commands must be what sequence of "buttons" real or imaginary you want executed); for example, You want the SKP to execute "DEV_TV, SET_OTHER_KEYS,discreteon" and LKP to execute "DEV_TV, SET_OTHER_KEYS, diecreteon, DEV_AUD, SET_VOL_KEYS, discreteon, TV"
(2) list each sequence in the appropriate column (SKP vs. LKP) in the spreadsheet;
(3) Decide how long you want the threshhold to be between the SKP and LKP sequence, and enter the appropriate number (I used 6 in this example - which yields about a 2-second threshhold).

Your desired sequence will be displayed across the bottom of the calculator, in this case you will get:
63 68 7E 2A 68 7E 2A 6F 7A 2A 01
Where the first hex byte (63) tells you:
(a) the duration betweem executing the SKP or LKP (6), and
(b) how many of the subsequent hex bytes apply to the SKP (3)

Then your SKP sequence is essentially a 3-button (in this example) macro, 68 7E 2A, which executes the sequence I described above; and
your LKP sequence is all that remains, 68 7E 2A 6F 7A 2A 01.

The readme describes a painful way to translate each button into a hex code and build these sequences manually, but the calculator is REALLY easy.

So, what do you do with this sequence you've generated? You create a KeyMove in IR! If you want the "1" button to exhibit this SKP/LKP behavior as described in TV device mode, you build a KeyMove:

Select Device - "TV", Key - "1"
at the bottom, select Device Type "TV" and Setup Code "1106" (these should correspond to the device and protocol upgrades - Device TV/1106 and Protocol 01 F9 - that the extender added to IR) select Hex Cmd and paste in that hex sequence and "voila!" when in TV mode, the "1" button will execute the SKP/LKP described above.

Of course the next step is, "What if I want the TV button to do this in EVERY device mode - i.e. "I want the SKP/LKP to act like a macro!"

Then there's one additional step. Assign the sequence to a keymove as described above, but you may want to use a phantom key rather than a real one, let's say TV "Phantom1" instead of TV "1". Then got to the Macros page and create simple macro for the TV button
"X_TV, PHANTOM1"

Now any press of the TV button, regardless of mode, will execute the short macro that calls out your SKP/LKP.

I know this is a long-explanation, but if you go step by step, it's really straightforward and pretty simple.

Good luck!

Posted: Thu Jan 15, 2004 9:23 pm
by markhs
Thanks for all the help. I think I have what I need now - I know what I am doing this evening.... :wink: