View Full Version : Expand your remote with a "shift" button

Mark F
December 6th, 2002, 03:35 PM
The attached .zip/.gml file contains a group which contains three commands. Using these commands, you can artifically extend the number of buttons on your remote control by choosing one to be a "shift" button. When you press the shift button, all events generated by the remote will be prefixed with the string "SHIFT_" until the shift button is pressed again (it is a toggle).

NOTE: All events used and generated by these commands will be prefixed by *.

Check out the readme for usage and setup details.

Hopefully, this will be useful to someone. :D

EDIT: It looks like some folks are finding this useful. Good. Please ask questions about this .gml file in this thread. I would like to try to keep all the relavent information (and any long winded explanations I may make :) ) in one spot to allow future users the benefit of our combined learning. Hopefully, this thread will become a better readme than the readme. :D Thanks.

EDIT 2: Attachment removed, see a later post for the latest files.

December 7th, 2002, 10:14 PM
Hey I've been trying to get this working but I'm not sure exactly how. I did get the Shift Key and All Keys commands bound to my remote properly.

But I'm not sure how to assign 2 different commands to the same key. Say I make a command to open winamp, and one to open notepad. What I tried to do was learn Winamp wiht one key... then press shift and learn Notepad with the same key... but it saves the same IR code so I'm not sure how to make it check for the SHIFT_ prefix.

Can anyone help me out here? Thanks.

December 8th, 2002, 01:00 AM
Never mind I figured it out. I got it workign with 3 separate buttons to increase functions now.

This program is freakin awesome... good job guys.


December 12th, 2002, 12:09 PM
okay you may have figures it out but I can't seem to. How do you get the shift to work?

Mark F
December 12th, 2002, 01:13 PM
Did you follow the steps in the readme file?

With which part are you having problems?

December 12th, 2002, 02:36 PM
Well after I bind the shift key to something (in my case the enter button on my creative remote) how do I make it so that a command uses the SHIFT_ prefix?

Mark F
December 12th, 2002, 03:22 PM
Have you bound all the keys from the remote to the All Keys command?

If so, every key should now be emiting two events. The original and one that has a * as the first character of the event string.

To bind the "*SHIFT_XXX" event to a command, you will do a modified learn event process:

Make the shift state be ON
Press the button you want to learn to the command
Highlight the command
Make sure the dropdown next to the Learn Event button says All
Press the Learn Event button
Highlight the Last Key command
Choose "Test Command" from the Commands menu item

Last Key will repeat the previous key so it will be learned as the trigger for your command.

Does this make sense?

December 12th, 2002, 04:04 PM
yes this helped. thank you very much!

December 13th, 2002, 10:58 PM
Crap! I r stoopid! okay so I first bound the shift key to my little enter key on my remote. Then I bound the all keys command to my little MIDI SysEx plugin. Now when I press the enter key on ym remote it gives the shift_ prefix... but wait it says that all of my original key commands now respond to both shift and normal mode what the fork?

December 13th, 2002, 11:03 PM
Sorry for the double post but to be more clear... I have a key programmed for normal volume control. When I press the shift button on my remote and try to make that same key control the treble volume command it now controls both the normal and treble volumes BUT when I press the shift button I only control the normal volume? I'm close but how to I get rid of controlling the normal volume when i press the shift key? Thanks.

Josh P
December 14th, 2002, 05:03 AM
I'm getting the same problem here, whenever i press the shift key and then the additional key it runs both commands. (eg both shift A and A)

Also the shift button appears locked. (eg if i press shift A then A, it gives me shfit A then shift A, until i deactivate the shift key by pressing it again)

I could probably get around this by writing a multigroup so that at the end of every shift + ? it runs a command that de-shifts but is this the way it's supposed to work?

Cheers Josh

Mark F
December 14th, 2002, 08:45 AM
I'm REALLY sorry. After this post, you may want to remove this stuff from your machine. :(

Problem 1: When the shift state is ON, the unshifted and shifted commands are BOTH executed.

Boy does THIS suck! You need to use the Last Key command when you learn an event for any of the keys that you have decided can be shifted. You have to do this whether you are learning the shifted OR unshifted event.

Since you have probably learned a lot of these unshifted events prior to using these new shift commands, an alternative to re-learning them using the Last Key command is to hand edit the .gml file.

NOTE: This is dangerous. If you decide to do this, make a backup copy of the .gml file before editing it.

Find and replace all of the un-shifted event strings that you have learned with the same string pre-pended with *. For example, assume your remote has a button marked 3 and when this button is pressed, Girder gets an event string that looks like this: 00f203. You would search for 00f203 in the file and replace it with *00f203. If you have learned the shifted version of this button to any commands, they will show up in the .gml as an event string of *SHIFT_00f203 so don't just global replace the string or these will cange to *SHIFT_*00f203 and will start failing!

Problem 2: The shift button is a toggle (it remains "locked" until pressed a second time)

This is as designed.

From the first post in this thread:

When you press the shift button, all events generated by the remote will be prefixed with the string "*SHIFT_" until the shift button is pressed again (it is a toggle).

The good news is this behavior can be changed.

I've attached a new .zip file that has two new commands that allow you to change the behavior of the All Keys command to be a toggle (default, just like now) or a one shot (the shift state turns off after it is used for one button). I also updated the readme.

EDIT: I removed this file. See a later post for the latest file that supports shift states. Thanks.

December 14th, 2002, 09:25 AM
If you press the shift key followed by a number key on the remote, wouldn't it be possible to send a simulated shift command to "Unshift" the toggle back to normal operation?

I would think this totaly possible, but haven't a clue at the moment.
Personally, I don't think I would want to "stick" the shift button, as it may become confusing as to what state it is in when I pick it up and cannot see the monitor.

Mark F
December 14th, 2002, 09:37 AM
Jeff -

Take a look at the file in my most recent previous post. It includes the ability to have the shift be a one-shot type thiing. IE. the shift turns off after being applied to one button.

January 30th, 2003, 11:32 AM
Hello Mark F!!
Congratulations for your useful plugin.
I don't know nothing about programing, so I wondered if it would be possible to improve even more the behavior of the shift key. I think it would be a good idea that if you press once the shift key it turns off when you press another key, but if you press twice the shift key it becomes turned on until you press it again.
This metod is used in come calculators and it is very useful.
I don't know if it would be very difficult to progame it, but if it is not I think it would be a grat improve for your plugin.

Cheers Griguol

Mark F
January 30th, 2003, 01:56 PM
Griguol -

Good suggestion! This sounds a lot like the sticky-key accessability options in Windows.

I can make it do this. Just not right now. I'll try to do make this option as soon as I get some free time at home.

Mark F
January 30th, 2003, 06:25 PM
I have incorporated Griguol's suggestion into the .gml file attached to this post.

EDIT: Removed attachment. See later post for a newer version.

January 31st, 2003, 11:43 AM
Thank you, Mark for your fast work, but when I use the toggle-shot it behaves exactly as the one shot mode. I don't know if I am doing something bad. hve I to relearn the keys or something like this? Please help


Mark F
January 31st, 2003, 12:26 PM
If you prss the shift key once, it should work like one-shot (any other key removes the shift state). If you press it twice, it should work like the toggle (a third press will remove the shift state).

January 31st, 2003, 12:40 PM
What I said is that if I press twice the shift key it doesn't stick, it turns off when you press another key

Mark F
January 31st, 2003, 01:48 PM
OK, I think some of the variables were not initialized. I have changed it to initialize all the variables when you execute any of the behavior choices.

Try the attached version.

January 31st, 2003, 02:08 PM
I think now the shift key doesn't work whichever behavior you choose.

Mark F
January 31st, 2003, 02:55 PM
I'm sorry but this version works flawlessly on my machine.

Please do me a favor, press F10 to bring up the LUA variables window. Now execute the toggle-shot behavior command. Note the values of the variables named TOGGLESHOT_MODE, SHIFT_KEY, TOGGLE_NEXT and TOGGLE_STATE. Press the shift key and note the values of these same variables. Press it again and note their values. Do this for a third time and post the results here.


January 31st, 2003, 03:27 PM
The values of the variables doesn't change when I press the shift key, and their values are always:


Mark F
January 31st, 2003, 04:57 PM
It looks like like the "Shift Key" command is not being triggered. Have you learned the button you want to use as the shift to the "Shift Key" command?

January 31st, 2003, 05:17 PM
I don't know what is happening. If I hightlight the Shift Key command and use it pressing F5 everything works, even the toggle-shot, but if I learn a button to it, I press this button and nothing happens. Do you know what is wrong?

January 31st, 2003, 05:47 PM
I don't know what happened but I have solved it including the Shift Key command in a multigroup and learning the button I want to be the shift to the multigroup. In this way it works.
Thanks for all.


February 11th, 2003, 07:04 AM
Forgive my ignorance, but this shifting technique effectively only doubles the keys available on your remote, no? :oops:

Is it possible to say, by pressing "1", it opens up a new 'gateway' to other potential ir codes, and "2" to an even more available keys and so on?

Can you do this with the Girder Shift.gml?

thanks a mill. :D

Mark F
February 11th, 2003, 08:21 AM
Asking a question is NOT showing ignorance. :)

Yes, this .GML file doubles the available keys by removing one of them (the shift key) from use.

What you are asking for can be done. It requires the LUA scripts in the .GML file to be changed to support multiple shift keys. I don't have any plans to do this but would be happy to give ideas and aid if you would like to do this.

February 11th, 2003, 08:22 AM

This is certainly possible. What I have setup at home is 6 different groups, and pressing the shift key moves through each of the groups.


Here's what I did:

Setup a Main group which handles all of the switching between groups.
Added an multi event for the shift button and assigned this a increment on register 1, then a Goto of Check Group 1.

In Check of Group 1, I see if the register 1 equals 1. If so, I switch to another multi group called Enable Group 1. If not go to Check group 2.

In Enable Group 1 I basically do a Group Enable of the actual Winamp controls, then a Group Disable on every other group.

I basically repeat the above 2 paragraphs for groups 2 to 6, before finally looping round back to a Reset command which sets register 1 back to 0.

Oh, and each Enable Group has an OSD that shows me the current group :)

In this way you can extend to any number of groups, just add the relevant Enable/Check routines, set the group you want to enable and add the commands as normal.

I dont have the exact .gml file here but I can post it up tommorow if you'd like. ^_^


February 11th, 2003, 10:34 AM
I have the same core shift-setup as Tashiketh describes above (I started out with another shift GML ( http://www.girder.nl/phpBB2/viewtopic.php?t=3293 ) and expanded it). I only want to add a few remarks:

(1) I use three buttons on the top of my remote for shifting between programs. For example:

button 1: winamp
button 2: mouse/keyboard control
button 3: changes between Tv Tool / power DVD / micro DVD

When away from the monitor, this prevents me from not knowing where I am in the button cycle (button 1 and 2 always enables the same applications and 1 and 2 always resets button 3 so that the next press of 3 starts over (enabling TV Tool).

I guess that the same thing also could be done with a one button cycle and a reset-cycle button, but I think the strategy above is swifter (especially when controlling many applications).

(2) The shift buttons operate via enable/disable group commands. The cycling button is a multi that enables different groups on different state counts.

(3) I have several shift-levels (which I think the original question was about). I use a fourth button on the top of the remote for level 2 shift. This is done with the same strategy of separate groups and enable/disable group commands set up within each level 1 group.

I mostly use the second shift level to open up and control OSD html menus with content related to the selected application (winamp playlists, movie files etc.)

Hope this was helpful for setting up shift buttons. :)

February 11th, 2003, 04:43 PM

Have DL the Multi-shift gml file referenced. Imported into my Girder. How do I assign keys???

I have tried another solution in a posting elsewhere, but cannot get it to work. Can you give me some simple instructions?



February 11th, 2003, 05:20 PM
it takes time for me to understand all this but i usually get there :)

i most sincere thanks to Mark F, Tashiketh, martin 5 and sibix 8)

so lucky i found this site :D :D :D :lol: :D :D :D

February 12th, 2003, 11:17 AM

Wouldn't mind seeing a copy of your gml... it's a bit more complex than mine.

The reason I only use 1 shift button is that I only have a creative credit card size remote, so I'm limited to 24 keys.


February 14th, 2003, 10:34 PM
Try the attached version.

Please can you tell me where I can find this "attached version"??


February 14th, 2003, 10:47 PM
Somewhere in this list :


Mark F
February 15th, 2003, 05:01 AM
Try this (http://www.girder.nl/filesbb/files/ShiftSupport_602.zip) one. :)

free spirit
March 12th, 2003, 10:12 AM
ok i may have missed something here so please excuse me if this has been asked before.

great plugin. every thing set up and fine. but i have one question :-

how do you set the default state that the toggle mode starts in?
it always defaults to one shot, i want it to start in toggle mode.

i have it always staying in toggle mode by adding the line
TOGGLE_STATE = 1 to the start of the shift script , but was wondering if there was another way (that i should have used :D ) ?

Mark F
March 12th, 2003, 11:19 AM
Do you load this automatically when Girder starts? If so, you could learn two events (GirderEnable and AfterScriptReset) to the "Toggle" command under shift behavior. This would cause the command to be executed every time devices are enabled or the script engine is reset.

free spirit
March 12th, 2003, 11:50 AM
thank you that worked fine (i always wondered what a girder event was for :lol: )

and yes the config loads automatically (the only time girder is loaded is when i move away from the computer and then it is routed to my tv :D )

April 30th, 2003, 09:49 AM
This line of discussion seems to have petered out for the moment, so I will post a request. I've read the entire Girder FAQ, as well as this message board, and I have found that, while the actual programming of commands is quite easy, the message board only serves to confuse because there are instructions for so many different versions. A brief summary of how to map the buttons would be nice. I would write it myself, but Iím still only ably to get the shift support to work in very crude ways.

Mark F
May 1st, 2003, 04:37 AM
Doesn't the included readme.txt file do this?

May 1st, 2003, 08:54 AM
Not really. GIrder is fairly easy to learn if you read the documentation, but this plugin just seems to be giving my friends and I lot of trouble, I don't think most people need a full rehash of what's already been said, or complete documentation for the plugin. Just a few steps on how to map the shift button, and how to map subsequent buttons to each command, would ease the pain of tinkering with this plugin for days.
On a less demanding note, I love this plugin. I have a truly tiny remote, and now it has more buttons than I can possibly use.

Mark F
May 1st, 2003, 01:46 PM
I will try but I don't know which part(s) you are having problems with so I may not answer all of your questions. If this is the case, please ask again and I'll try again.

First, the readme.txt file:

Girder Shift button support

The .gml file contains two groups. One group (Shift Support) contains three commands and the other group (Shift Behavior) contains three commands.

Shift Support Group -
The commands in this group do the actual processing of buttons and generate the shift behavior set through the commands in the other group.

The first command is "Shift Key". Learn the "shift button" to this command.

The second command is "All Keys". Learn all the buttons (except the shift button) of the device to this command (See below).

The Third command is "Last Key". This command emits the last button that was processed. Use this command to learn shifted and unshifted buttons to other commands. ie. Press the button you want to learn, press the learn event button, use the Last Key command to re-emit the previous button.

NOTE: All buttons used and generated by these commands will be prefixed by *.

NOTE: You MUST use Last Key to learn the shifted OR unshifted version of any buttons for this to work. If you have already learned some of these buttons to commands without using the Last Key command, you must re-learn these button events or hand edit the .GML file to use the event string prefixed by *.

Shift Behavior Group -
The commands in this group let you set the shift behavior to be a toggle (the shift button sticks on until pressed a second time), a one shot (the shift button is applied to one key and turns off) or a "toggle-shot". Toggle-shot is a hybrid of the previous two modes. If you press the shift button once, it acts like one-shot; if you press it twice, it acts like toggle.

The button you want to use as a shift button needs to be learned to the "shift key" command in the shift support group. To do this:

Highlight the shift key command by clicking on it
Choose "All" from the dropdown list box next to the learn event button
Press the learn event button
Press the shift button on your remote

All buttons you want to be shift-able need to be learned to the "All keys" command using the same procedure.

When you want ot learn one of these keys (in the future) as a trigger for a command:

Press the button you wish to learn while it is in the shift state you want to use
Highlight the command you want to learn the button for by clicking on it
Choose "All" from the dropdown list box next to the learn event button
Press the learn event button
Highlight the "Last Key" command
Use the Command/Test Command function

Again, if I missed something or didn't go into enough detail, please let me know and I'll try again.

May 4th, 2003, 01:30 PM
After giving a printout of your reply to my friend, he was able to follow the directions and make some commands using the shift button. I suppose a simple reiteration of essentially the same instructions in different language was all that was necessary. Many thanks.

June 15th, 2003, 01:18 AM
As i say everytime i post here, i'm a newbie so i could very well be wrong!

But, I've reciently started to play with 'shifting' to allow my ATI Remote Wonder to have different key sets for different aplications. I saw this shifting thread and realized that it woud give me most of what i wanted. I could have two key sets one for xlobby and another for windvd. Of course my first question was "wait, how do i control 3 app's" so i searched more and found a this in another thread:


That multishift script was a much better fit for my needs. There isnt any documentation in that zip file but once you load it you should be able to figure out what it's doing. With its method of enabling and disabling entire groups should allow me to have a seperate set of keys for any number of applications. Just wanted to get this info in here as an alternative to the method described in this thread.

Here's the therad that turned me on to the other method:


September 12th, 2003, 12:28 PM
hey Mark,
i'm new to this forum but i think ive got a hang of the shifting technique.Great work!!
it makes my k/b like a multimedia k/b .thanx a lot.
i was thinking that if you need it ,maybe i could make a simpler readme for your gml file so that the average user can use it as well.
wot say?!!hit me back on this if u agree.


October 2nd, 2003, 07:31 PM
I would like to say "Thanks" for this incredible program.


October 10th, 2003, 07:21 AM
Caution: Stupidity ahead!

Hi all.
I've been needing a feature like this and so finally set off to find one, and low and behold it was there.
However, I need help. I don't know what I'm doing.
This is the situation. I use girder to controll my remote with Zoom Player.
I have one spare button, but need 2 (possibly more as soon as I get everything worked out).
I currently have 3 buttons, one that I want to act as the shift button, one volume up and one volume down.
I want the 2 volume buttons to act as volume up and down in unshift mode, but act as audio resync buttons in shift mode.

How do I do it?
I've assigned my shift button to "Shift Key" via Learn Event, and my volume buttons to "All Keys" via Learn Event.
... And that's as far as I've gotten.
What do I do next? I'm completley lost. I'm usually very quick when it comes to figuring out software, usually doing it without any reference to documentation, but you have me stumped (congratulations I guess).

Pleeeease help

P.S. If I figure it out then I'll post a follow-up to save you the trouble of going through it.

October 10th, 2003, 11:50 AM
through some logical thinking I've just used groups and enabling/disabling, etc. to add a second function. So what happens is I press my Second function key and then My volume up/down become my sync up/down until I press any other button, at which time it reverts back to normal state.
SOOO, feel free to tute my on your plugin as if may work nicer, but if not, don't worry.
Thanks anyway

October 8th, 2004, 11:36 AM
I appreciate the program Mark. It works great. I'm using the Remote Wonder on WinXP. Along with this shift and group focusing I have potentially over 80 programable buttons per program.

I noticed a couple of things that may help some people out. For me I had to add the event string "at Girder open" to the shift behavior scripts and they had to be in this order; one shot, toggle and toggle shot for it to work consistently and perfectly. I simple put them in a multigroup in the afore mentioned order.

Also, I have no experience in scripting but I came up with a simple script that works great for me that puts a small icon in the upper left corner of my screen to indicate when I am in shift mode. I'd like for others to see it and tell me if is a potential problem (mainly cause it was too simple and it works and that I've seen nobody has done it so it must be wrong!).

if (SHIFT_KEY == 1) then

if (SHIFT_KEY == 0) then

Hopefully you or someone still checks into this thread and could let me know. Otherwise, thats it, thanks alot.

October 8th, 2004, 11:43 AM
Also, I didn't mention, I attached the event string "on any event" to the shift OSD script. That's where I am concerned that it may cause problems, not that it has for me but I noticed it is always the last event checked by Girder. I have antirepeat set at 500.


Dj Elmo
January 13th, 2007, 08:23 PM
Hi all

Sorry for posting in such an old thread, but can anyone point me in the right direction to download the shift key file?

When I click on the ones in this thread they are all deleted.


January 14th, 2007, 03:57 AM
hi DJ Elmo,

have a look at my posts in this thread: http://www.promixis.com/forums/showthread.php?t=14535

hope this helps ;)