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.
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.
VNC Keyboard Events
Re: VNC Keyboard Events
I thought I would have to go and add new triggers for the simulated keypresses in addition to the physical keypresses. Turns out it will trigger on the same keypress for physical and simulated as long as both plugins are loaded. Not sure if that was your intention for the plugin or not.
Re: VNC Keyboard Events
jinxdone - You are right about the handling of modifier keys, and I don't believe there is a good way to avoid the SimKeys plugin getting the keys distinctly. However, I think I found a way to ignore them in the plugin.
Basically I created a list (python "set") of modifier keys (Shift, Ctrl, Alt, Win). Whenever the plugin gets a value, I remove the modifiers and see how long the resulting list is. If the length is zero, I return without any processing. That way, no event is triggered until a non-modifier key is included. So in Dustin's example above, only SimKey.LShift+LCtrl+LAlt+E would show up (since the length without modifiers is 1 (the "E").
In theory someone could run a macro whenever Shift is entered, without waiting for any other key. These mods will preclude that type of handling, but I think this is better for 99.9% of users.
Dustin, give this one a try and let me know how it works.
Brett
Basically I created a list (python "set") of modifier keys (Shift, Ctrl, Alt, Win). Whenever the plugin gets a value, I remove the modifiers and see how long the resulting list is. If the length is zero, I return without any processing. That way, no event is triggered until a non-modifier key is included. So in Dustin's example above, only SimKey.LShift+LCtrl+LAlt+E would show up (since the length without modifiers is 1 (the "E").
In theory someone could run a macro whenever Shift is entered, without waiting for any other key. These mods will preclude that type of handling, but I think this is better for 99.9% of users.
Dustin, give this one a try and let me know how it works.
Brett
- Attachments
-
- __init__.py
- Modifier key version of SimKey plugin.
- (3.49 KiB) Downloaded 319 times
Re: VNC Keyboard Events
I'm not following. Can you try that again?skreien wrote:I thought I would have to go and add new triggers for the simulated keypresses in addition to the physical keypresses. Turns out it will trigger on the same keypress for physical and simulated as long as both plugins are loaded. Not sure if that was your intention for the plugin or not.
Brett
Re: VNC Keyboard Events
Sure.
Pretty much all my stuff is keyboard driven. So I have a trigger of ctrl-alt-f1 assigned to one of my macros. All I had to do to activate the macro was load the new simkey plugin. Even though the event starts with simkey in the log, the event will still trigger on the physical keyboard trigger that was assigned to it previously for the physical keyboard.
I guess a better way to explain it would be that with both keyboard and simkey plugins loaded there is no way to specify that I want this macro to trigger on a physical keypress but not a simkey keypress or vice-versa. I wasn't sure if it was your intention to make the events coming from each plugin completely separate or not. Right now they aren't, which is fine by me, but I can see where it could come in handy to have them separated by plugin.
Pretty much all my stuff is keyboard driven. So I have a trigger of ctrl-alt-f1 assigned to one of my macros. All I had to do to activate the macro was load the new simkey plugin. Even though the event starts with simkey in the log, the event will still trigger on the physical keyboard trigger that was assigned to it previously for the physical keyboard.
I guess a better way to explain it would be that with both keyboard and simkey plugins loaded there is no way to specify that I want this macro to trigger on a physical keypress but not a simkey keypress or vice-versa. I wasn't sure if it was your intention to make the events coming from each plugin completely separate or not. Right now they aren't, which is fine by me, but I can see where it could come in handy to have them separated by plugin.
Re: VNC Keyboard Events
That behavior was not my intention, and is definitely unexpected.
Can you cut/paste an example macro as a reply, one that triggers from either SimKey.
Can you cut/paste an example macro as a reply, one that triggers from either SimKey.
Code: Select all
or Keyboard.[code]?
Thanks,
BrettRe: VNC Keyboard Events
@skreien-
Could you test something for me?
In the file [EG directory]\eg\Classes\EventGhostEvent.py, could you change the line (#142) from
to
I think that will keep the SimKey events from triggering Keyboard macros, but I'd appreciate a test.
Thanks,
Brett
Could you test something for me?
In the file [EG directory]\eg\Classes\EventGhostEvent.py, could you change the line (#142) from
Code: Select all
if self.prefix != "Keyboard":Code: Select all
if not (self.prefix == "Keyboard" or self.prefix == "SimKey"):Thanks,
Brett
Last edited by stottle on Sun Nov 29, 2009 3:47 am, edited 1 time in total.
Re: VNC Keyboard Events
I don't have that directory...
Re: VNC Keyboard Events
Sorry, I edited my post above. It was supposed to be [EG directory]\eg\Classes\EventGhostEvent.py.
Brett
Brett
Re: VNC Keyboard Events
OK, I'll give this a try later today.
Re: VNC Keyboard Events
Looks like that's done it. The testing I've done has all been successful.
-
seelenfaenger
- Posts: 4
- Joined: Thu Feb 24, 2011 5:05 pm
Re: VNC Keyboard Events
Many thanks stottle for this plugin! I currently use it for building up my new HTPC which is equipped with an iMon remote. The iMon Manager triggers the simulated keyboard shortcuts registered in eventghost and eventghost itself triggers XBMC or DVBViewer. Now there are some questions/suggestions I have:
This plugin has made it possible for me to use the soungraph remote even without having a working soundgraph plugin (which I would have preferred).
greetings
seelenfaenger
- As far as I have noticed the file cFunctions.pyd has to be replaced. Would it be possible to have it in the standard eg distribution? Maybe having the affected behaviour being configurable?
As I am a big fan of this plugin I think it would be a great addition to the standard distribution of eventghost.
This plugin has made it possible for me to use the soungraph remote even without having a working soundgraph plugin (which I would have preferred).
greetings
seelenfaenger
Re: VNC Keyboard Events
In reading this thread it looks like a plugin was created to register HippoRemote (And likely all VNC applications) virtual keyboard functions in EventGhost similar to regular keyboard functions. What is the name of this plug-in?
Is there a better way to get HippoRemote functions to register in EventGhost?
I saw a HippoRemote post about triggering EventGhost from HippoRemote through URLs. Does anyone know how to do this?
http://blog.hipporemote.com/2011/05/hip ... e-pro-3-1/
Thanks in advance for any help.
Is there a better way to get HippoRemote functions to register in EventGhost?
I saw a HippoRemote post about triggering EventGhost from HippoRemote through URLs. Does anyone know how to do this?
http://blog.hipporemote.com/2011/05/hip ... e-pro-3-1/
Thanks in advance for any help.
Re: VNC Keyboard Events
I did manage to find out how to get HippoRemote working through HTTP. Here are the steps.
- Add the EventGhost webserver plugin
----- Port: 80
----- Directory: (Didn't seem to matter)
----- Event prefix: HTTP
----- Realm: EventGhost
----- Username: (None)
----- Password: (None)
- Make sure your Hippo Server is running
- In your HippoRemote app (on your phone)
----- Change the command on a HippoRemote function to: [http://localhost?volUp]
----- Press the HippoRemote function
----- EventGhost logger will register a "volUp" event that can be used for macros
Replace volUp with whatever tag you would like and drag and drop all of the desired events to the desired macros. In my example I used volUp to trigger a "Microsoft MCE Remote" action to adjust the volume on my AV Receiver from within HippoRemote.
Worked like a charm.
I am however still curious to know if a VNC logger plugin was ever created for EventGhost.
- Add the EventGhost webserver plugin
----- Port: 80
----- Directory: (Didn't seem to matter)
----- Event prefix: HTTP
----- Realm: EventGhost
----- Username: (None)
----- Password: (None)
- Make sure your Hippo Server is running
- In your HippoRemote app (on your phone)
----- Change the command on a HippoRemote function to: [http://localhost?volUp]
----- Press the HippoRemote function
----- EventGhost logger will register a "volUp" event that can be used for macros
Replace volUp with whatever tag you would like and drag and drop all of the desired events to the desired macros. In my example I used volUp to trigger a "Microsoft MCE Remote" action to adjust the volume on my AV Receiver from within HippoRemote.
Worked like a charm.
I am however still curious to know if a VNC logger plugin was ever created for EventGhost.