Keyboard+

Questions and comments specific to a particular plugin should go here.
User avatar
blackwind
Experienced User
Posts: 182
Joined: Wed Sep 12, 2012 2:59 am
Location: Canada
Contact:

Keyboard+

Post by blackwind » Sat Mar 29, 2014 12:12 pm

cFunctions -- in particular, the hooking code -- is a complete mess that I'd like to see buried sooner rather than later. To that end, I've rewritten the Keyboard plugin using a proven library: pyHook. This is a drop-in replacement for the stock Keyboard plugin, meaning your existing configuration will work without a single modification. Help me test it, won't you?

Because of the ancient version of wxPython we bundle, this plugin, through no fault of its own, will crash EventGhost from time to time. To reduce the frequency of crashes, it's suggested that you also load the Task plugin and create macros to disable Keyboard+ on Task.Activated.EventGhost and re-enable it on Task.Deactivated.EventGhost.

Changelog:

Code: Select all

v2014.03.29.1:
Initial release.

v2014.04.29.1:
* Changed: We now hook a slightly different way to reduce crashes.
* Fixed: Ctrl+Alt+Del previously didn't release.

v2014.06.27.1:
* Fixed: When using Win key combinations, if you released Win before the other key, the start menu would popup.
https://github.com/blackwind/eg-keyboard-plus
Last edited by blackwind on Fri Feb 26, 2016 6:00 am, edited 10 times in total.
/bw

matejdro
Posts: 37
Joined: Wed Jul 21, 2010 9:58 am

Re: Keyboard+

Post by matejdro » Sun Apr 20, 2014 7:40 pm

Just want to report that it works great!

I noticed that keyboard plugin has trouble with multiple-pressing LWin combinations (for example holding LWin key and pressing any other key twice will only register it once in EG if that key is mapped to event). This plugin fixes it.

EDIT: But appears to have problems with LWin+numpad combos. Holding LWin and pressing Numpad8 several times for example will freeze EG.

User avatar
blackwind
Experienced User
Posts: 182
Joined: Wed Sep 12, 2012 2:59 am
Location: Canada
Contact:

Re: Keyboard+

Post by blackwind » Sun Apr 20, 2014 10:02 pm

Based on what I've read, I believe that's a wxPython threading issue that, hopefully, has been resolved in a more recent build. If you don't touch the keyboard while EG is focused (which, I realize, is highly inconvenient), I have yet to see it freeze.

Until the Git repository is ready for primetime and we can dig in and update wxPython, using this plugin will be something of a tradeoff. I find it to be far more stable than the stock Keyboard plugin, but... the freezes. Ugh.

By the way, something I forgot to mention in the first post -- this plugin is a drop-in replacement for the stock Keyboard plugin. Your existing configuration will work without a single modification.
/bw

matejdro
Posts: 37
Joined: Wed Jul 21, 2010 9:58 am

Re: Keyboard+

Post by matejdro » Mon Apr 28, 2014 7:36 pm

So it won't freeze if I don't touch keyboard when EG is not active?

Maybe you could set up actions to enable/disable plugin as a workaround so I could set it to automatically disable itself when EG opens.

User avatar
blackwind
Experienced User
Posts: 182
Joined: Wed Sep 12, 2012 2:59 am
Location: Canada
Contact:

Re: Keyboard+

Post by blackwind » Mon Apr 28, 2014 8:54 pm

In theory, that should work. See the Task plugin and Task.Activated.EventGhost/Task.Deactivated.EventGhost.
/bw

matejdro
Posts: 37
Joined: Wed Jul 21, 2010 9:58 am

Re: Keyboard+

Post by matejdro » Mon Apr 28, 2014 9:44 pm

Nope just tested, plugin will also freeze with EG not active (only in tray, no window)

User avatar
blackwind
Experienced User
Posts: 182
Joined: Wed Sep 12, 2012 2:59 am
Location: Canada
Contact:

Re: Keyboard+

Post by blackwind » Mon Apr 28, 2014 11:28 pm

Currently testing the same solution on my end. It appears the Task plugin wasn't catching all activations, but with the attached modification, it's been stable for me thus far.

EDIT: The updated Task plugin I posted here is now bundled with EventGhost. Attachment removed.
Last edited by blackwind on Wed Dec 09, 2015 9:08 pm, edited 1 time in total.
/bw

matejdro
Posts: 37
Joined: Wed Jul 21, 2010 9:58 am

Re: Keyboard+

Post by matejdro » Tue Apr 29, 2014 1:06 pm

Problem is not task plugin, I was having issues when EventGhost was NOT ACTIVE so when keyboard plugin is supposed to be enabled.

User avatar
blackwind
Experienced User
Posts: 182
Joined: Wed Sep 12, 2012 2:59 am
Location: Canada
Contact:

Re: Keyboard+

Post by blackwind » Wed Apr 30, 2014 1:42 am

It finally crashed for me while inactive.

Attachment in the first post has been updated with an alternate hooking implementation and a fix for Ctrl+Alt+Del, which previously didn't release. Again, stable for me thus far (24h and counting) with the enable/disable workaround and the updated Task plugin, but time will tell.
/bw

matejdro
Posts: 37
Joined: Wed Jul 21, 2010 9:58 am

Re: Keyboard+

Post by matejdro » Mon May 05, 2014 7:57 am

It seems to work so far. Will report if anything crashes.

Thanks.

User avatar
blackwind
Experienced User
Posts: 182
Joined: Wed Sep 12, 2012 2:59 am
Location: Canada
Contact:

Re: Keyboard+

Post by blackwind » Mon May 05, 2014 11:51 pm

No crashes for a week on this end. I'm running Keyboard+ full-time now.
/bw

matejdro
Posts: 37
Joined: Wed Jul 21, 2010 9:58 am

Re: Keyboard+

Post by matejdro » Wed May 21, 2014 6:54 pm

Reporting in, everything working so far even without disabling plugin when EG is open! Thanks a lot.

One question though: is it possible to make hooking a bit more aggressive? For example when playing a game, sometimes EG won't register keys because game already hooked them. Is this even possible?

User avatar
blackwind
Experienced User
Posts: 182
Joined: Wed Sep 12, 2012 2:59 am
Location: Canada
Contact:

Re: Keyboard+

Post by blackwind » Wed May 21, 2014 10:58 pm

Not possible, I'm afraid. Both pyHook and cFunctions already use the most aggressive available hooking API.

Thanks for checking in!
/bw

blaher
Experienced User
Posts: 464
Joined: Thu Nov 17, 2011 1:27 am

Re: Keyboard+

Post by blaher » Wed May 28, 2014 4:15 am

It crashes for me if I do ctrl+alt+4, for example, with stickey keys turned on.

User avatar
blackwind
Experienced User
Posts: 182
Joined: Wed Sep 12, 2012 2:59 am
Location: Canada
Contact:

Re: Keyboard+

Post by blackwind » Wed May 28, 2014 5:10 am

That doesn't particularly surprise me, but it's definitely something worth noting for those who use sticky keys.

It's unfortunate that I can't do anything further on my end to smooth out this plugin. pyHook and wxPython (the version we're currently bundling, at least) just won't get along.
/bw

Post Reply