
EG doesn't recognize soft (emulated) key presses
-
- Posts: 9
- Joined: Tue Jul 28, 2009 4:53 am
EG doesn't recognize soft (emulated) key presses
I don't know if you'd consider this a bug, but EG will not recognize emulated key press events generated by GlovePIE. Every other program recognizes it, EG itself will jump to anything beginning with the letter, and even keyboard lights come on but EG will not generate an event. This is getting me really frustrated. I've been looking into using OSC, MIDI, network packets, and even tried resorting to key presses to get GlovePIE to send commands to EG but nothing works 

Re: EG doesn't recognize soft (emulated) key presses
Doesn't glovepie allow running programs? You can run "eventghost.exe -e event payload" to trigger events. I'd guess it'd also be possible to use the simple udp packet plugin(search the forum) or some of the other plugins to interface with EG to trigger events.
-
- Posts: 9
- Joined: Tue Jul 28, 2009 4:53 am
Re: EG doesn't recognize soft (emulated) key presses
I never knew that, but once again I run into a problem. I can give it the filepath for a file to run, but I cannot pass command line arguments with it... also, I dont see this plugin you were talking about...
-
- Posts: 9
- Joined: Tue Jul 28, 2009 4:53 am
Re: EG doesn't recognize soft (emulated) key presses
Actually, let me see if I can't include the arguments in a .bat file and run that... *crosses fingers*
Last edited by Chaemelion on Wed Jul 29, 2009 9:53 am, edited 2 times in total.
Re: EG doesn't recognize soft (emulated) key presses
I was referring to this plugin: http://www.eventghost.org/forum/viewtopic.php?f=9&t=724
It listens for udp broadcasts and triggers events. Those should be simpler to send than what the protocol for the normal network sender plugin requires. I'm not too familiar with glovepie though so I'm not sure which is the easiest to do with it.
It listens for udp broadcasts and triggers events. Those should be simpler to send than what the protocol for the normal network sender plugin requires. I'm not too familiar with glovepie though so I'm not sure which is the easiest to do with it.
-
- Posts: 9
- Joined: Tue Jul 28, 2009 4:53 am
Re: EG doesn't recognize soft (emulated) key presses
ah, I was searching for UDP. Anyhow, it worked! I'll have to make a batch file for each command, but it works flawlessly! Thanks so much 

Re: EG doesn't recognize soft (emulated) key presses
You can pass command line arguments. They will be in the payload. Have a look at this macro:Chaemelion wrote:I never knew that, but once again I run into a problem. I can give it the filepath for a file to run, but I cannot pass command line arguments with it... also, I dont see this plugin you were talking about...
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1016">
<Macro Name="Execute Command" Expanded="True">
<Event Name="Main.CMD" />
<Action>
EventGhost.PythonScript(u'eg.globals.param = ""\nfor p in eg.event.payload[1:]:\n eg.globals.param += \' \' + p\neg.plugins.EventGhost.ShowOSD(eg.event.payload[0]+" "+u\'{eg.globals.param}\', u\'0;-32;0;0;0;700;0;0;0;0;3;2;1;34;Arial\', (255, 255, 255), (0, 0, 0), 4, (0, 0), 0, 5.0, False)\n\neg.plugins.System.Execute(eg.event.payload[0], eg.globals.param, 0, False, 2, u\'\')\n\n# to use spaces in paramters use triple quotes:\n# eventghost.exe -e MyEvent """C:\\users\\My Space""" some more options\n# => MyEvent "C:\\users\\My Space" some more options')
</Action>
</Macro>
</EventGhost>

Code: Select all
EventGhost.exe -e CMD notepad.exe """c:\program files\desktop.ini"""
EventGhost.exe -e CMD cmd /C dir """c:\program files""" /P /S
The second line runs CMD, which itself opens a new CLI and executes dir "c:\program files" /P /S.
The triple quotes in the above command lines are needed, because there are spaces in the filename. EG (Python) will translate them to single quotes when executing the macro.
-
- Posts: 9
- Joined: Tue Jul 28, 2009 4:53 am
Re: EG doesn't recognize soft (emulated) key presses
I understand, my problem was GLOVEPIE could execute applications, but it wont pass command line arguments with it. I could tell it to launch "EventGhost.exe" but it wouldnt run "EventGhost.exe -e Time.Query". What I had to do is combine the command and command line arguments into a single command, so I put them both together (EventGhost.exe -e Time.Query) into a windows batch file so Glovepie could run that and still include the arguments. Thanks for your help, my problem is solved. It doesn't matter to me anymore, but EG still doesn't create events for emulated key presses. Maybe it's being emulated too high up there for EG to see it... or perhaps it was done on purpose so EG wont recognize when IT is doing the emulating...