Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Mapping EG (Firefly) buttons to keyboard keys?

If you have a question or need help, this is the place to be.
stisev
Experienced User
Posts: 162
Joined: Tue Jun 26, 2007 2:55 am

Mapping EG (Firefly) buttons to keyboard keys?

Post by stisev »

Hi Bit/all,

One thing I've always wanted to do is use EG to map certain key commands to my Firefly remote. For example, I want to be able to hit "Function" + "F8 (LCD/CRT) to cycle through the different CRT/LCD modes.

Is there any way EG could show what keyboard keys are being pressed, then assign those keys to a snapstream firefly button (so if I press the channel up button, it would initiate an action for "FUNCTION + F8" every time I pressed it (just like I would do on a keyboard).

Not only would this be UNBELIEVABLY useful, it would expand EG to a whole new horizon.

Bit - is this possible now; if not, could you implement it in EG? Pwetty please?
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: Mapping EG (Firefly) buttons to keyboard keys?

Post by Bitmonster »

Actually I haven't understood the question. What is "Function"?
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
User avatar
jinxdone
Plugin Developer
Posts: 443
Joined: Tue Jan 02, 2007 4:08 pm

Re: Mapping EG (Firefly) buttons to keyboard keys?

Post by jinxdone »

I think he means the 'Fn' keys of laptops for example, used to access the laptop features like toggling vga output on/off.
User avatar
Bitmonster
Site Admin
Posts: 2239
Joined: Mon Feb 06, 2006 10:28 pm

Re: Mapping EG (Firefly) buttons to keyboard keys?

Post by Bitmonster »

If the keyboard plugin shows no reaction on these keys, EventGhost will not be able to use them. I guess they have hardcoded these buttons to some internal wires to control the chipset. And only the manufacturer knows how to use them.
Please post software-related questions in the forum - PMs will only be answered, if really private, thanks!
stisev
Experienced User
Posts: 162
Joined: Tue Jun 26, 2007 2:55 am

Re: Mapping EG (Firefly) buttons to keyboard keys?

Post by stisev »

First of all, WOW, I had no idea there was a keyboard plugin! Is this new?!
Second, yes, the Fn (function) key doesn't show up in the keyboard plugin. :(

So close, yet so far. ;)
CollinR
Experienced User
Posts: 265
Joined: Tue Sep 05, 2006 7:16 am
Location: Oklahoma
Contact:

Re: Mapping EG (Firefly) buttons to keyboard keys?

Post by CollinR »

You don't need to bother with the keyboard inputs unless you just want to. It's easier to cut to the chase and determine the end goal. If you want it to change display modes based on the channel up button on the firefly just use the system plugin to change to the desired mode when channel up is pressed.

Optionally you can create an alternative hotkey that will do the same from the keyboard but doesn't require the function button.

ie Alt+Ctrl+D = change display mode

Sooo many ways to skin a cat EG has almost everything covered. :D
stisev
Experienced User
Posts: 162
Joined: Tue Jun 26, 2007 2:55 am

Re: Mapping EG (Firefly) buttons to keyboard keys?

Post by stisev »

Hi Colin,
I don't really understand. The only way I know how to INITIATE the command (to toggle between these mods) is to press FN + F8 keys.

Are you say there's a way of doing this via EG?
CollinR
Experienced User
Posts: 265
Joined: Tue Sep 05, 2006 7:16 am
Location: Oklahoma
Contact:

Re: Mapping EG (Firefly) buttons to keyboard keys?

Post by CollinR »

What does Fn+F8 do exactly? I am invisioning going from 800x600 to 1024*768, the system plugin can handle that directly.

System>Display>Set Display Preset can do even more.
stisev
Experienced User
Posts: 162
Joined: Tue Jun 26, 2007 2:55 am

Re: Mapping EG (Firefly) buttons to keyboard keys?

Post by stisev »

CollinR wrote:What does Fn+F8 do exactly? I am invisioning going from 800x600 to 1024*768, the system plugin can handle that directly.

System>Display>Set Display Preset can do even more.
No, it cycles through the "video" modes. The F8 button has a label of "CRT/LCD" on it.

So, pressing Fn + F8 would first press 1) enable the secondary video input 2) disable it 3) disable the MAIN display and run the VGA OUT.

AFAIK, there's no way to do this otherwise.
CollinR
Experienced User
Posts: 265
Joined: Tue Sep 05, 2006 7:16 am
Location: Oklahoma
Contact:

Re: Mapping EG (Firefly) buttons to keyboard keys?

Post by CollinR »

Load the system plugin
Create a new action.
Go through System>Display>Set Display Preset and have it query for your current display settings.

You should get an action like this

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="908">
    <Action>
        System.SetDisplayPreset(('\\\\.\\DISPLAY1', 0, 0, 1280L, 1024L, 60L, 32L, True, True, 0L))
    </Action>
</EventGhost>
Now press Fn+F8
Create a new action.
Go through System>Display>Set Display Preset and have it query for your current display settings.

You should get a very similar action created.

Now you can link those actions to Events from the FireFly (I use the "Help" button) or from keyboard hotkeys or whatever.

EDIT:
As Bitmonster mentioned this could be going directly to the onboard video controller. If so you are hosed.
stisev
Experienced User
Posts: 162
Joined: Tue Jun 26, 2007 2:55 am

Re: Mapping EG (Firefly) buttons to keyboard keys?

Post by stisev »

IT WORKED!!!


Hooray! Thanks Colin! With a little hacking of the XML file, it worked!

Here's what I used. God damn... words can't express how much I love EventGhost right. Bit -- next time you're in the Bay Area, I'm buying you the most expensive hooker on Broadway.

;)
Cheers!
CollinR
Experienced User
Posts: 265
Joined: Tue Sep 05, 2006 7:16 am
Location: Oklahoma
Contact:

Re: Mapping EG (Firefly) buttons to keyboard keys?

Post by CollinR »

SWEET! 8)
stisev
Experienced User
Posts: 162
Joined: Tue Jun 26, 2007 2:55 am

Re: Mapping EG (Firefly) buttons to keyboard keys?

Post by stisev »

Hi Colin,
Hope your still monitoring this thread. ;)

I was wondering if there was anyway for EG to export keyboard commands through some kind of plugin.

For example:

I press the button "1" on my Firefly.

[1] > EG triggers ALT + 2 > waits 5 seconds > triggers key O > waits 5 secs > triggers key TAB, etc etc.

Does that make any sense?
CollinR
Experienced User
Posts: 265
Joined: Tue Sep 05, 2006 7:16 am
Location: Oklahoma
Contact:

Re: Mapping EG (Firefly) buttons to keyboard keys?

Post by CollinR »

You will need to add the FireFly event 1 as the trigger but these are the actions.

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="908">
    <Macro Name="stiev">
        <Action>
            Window.SendKeys(u'{Alt+2}', False)
        </Action>
        <Action>
            EventGhost.Wait(5.0)
        </Action>
        <Action>
            Window.SendKeys(u'o', False)
        </Action>
        <Action>
            EventGhost.Wait(5.0)
        </Action>
        <Action>
            Window.SendKeys(u'{Tabulator}', False)
        </Action>
    </Macro>
</EventGhost>
This can be one better, those 2 5 second waits will cause EG to wait for all outputs. I may redo it with the timer plugin, it's more complicated but would actually work better.
easy
Posts: 46
Joined: Wed Dec 05, 2007 10:05 pm

Re: Mapping EG (Firefly) buttons to keyboard keys?

Post by easy »

stisev wrote:IT WORKED!!!


Hooray! Thanks Colin! With a little hacking of the XML file, it worked!

Here's what I used. God damn... words can't express how much I love EventGhost right. Bit -- next time you're in the Bay Area, I'm buying you the most expensive hooker on Broadway.

;)
Cheers!
So, what exactly have You used? I am interested as I have brought home one verry old notebook and intend to use it for separate HC pc.
As for the moment I wasn't successfull using display preset. I'we edited xml by hand to make "attached" and "primary" for NB's LCD to false and true for VGA out.
Post Reply