Keyboard plugin issue

Found a bug in EventGhost? Report it here.
Post Reply
asselin
Posts: 1
Joined: Sun May 24, 2015 7:50 pm

Keyboard plugin issue

Post by asselin » Sun May 24, 2015 8:05 pm

I ran into an issue with the Keyboard plugin when multiple keys are pressed.

The case is something like this:

1. I have an active handler for Keyboard.A in the tree.
2. Press space
3. Press A
4. Release space

When you do that, you start getting "a" events sent to the active window, which I would not expect to happen, since there's an active handler for Window.A (if you just press the A key, you won't get "a" events sent to the active window).

The reason this happens is that after you release the space key, the next key event that comes in is the repeat for "A", and in InsertKey in keyhook.c, there is this bit of code:

Code: Select all

		if (khData.pressedKeys[i] == key)
		{
			// They key is already in. This should never happen, but it happens
			return FALSE;
		}
The A key is already in the array. The problem is the return FALSE, which causes KeyboardProc() to call the next hook instead of calling the Python handler.

I believe just changing the return FALSE to return TRUE should fix this.

Where is EventGhost's code currently hosted? Can I submit a pull request somewhere for this issue?

Thanks!

pearbear
Experienced User
Posts: 150
Joined: Mon Apr 02, 2012 10:28 pm
Contact:

Re: Keyboard plugin issue

Post by pearbear » Fri Oct 23, 2015 9:29 am

Where is EventGhost's code currently hosted? Can I submit a pull request somewhere for this issue?
I think it's hosted at http://sourceforge.net/projects/eventghost/ but it seems like people are just posting their patches to this topic: viewtopic.php?f=12&t=7443. It would be really nice if there was better documentation of how to contribute code.

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

Re: Keyboard plugin issue

Post by blackwind » Fri Oct 23, 2015 8:54 pm

If you choose to contribute, be sure to compile your changes and thoroughly test them first. As someone who's spent considerable time debugging the Keyboard plugin, take it from me -- any change you make, no matter how harmless it appears, will probably end up breaking something else.
/bw

Sem;colon
Experienced User
Posts: 582
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Keyboard plugin issue

Post by Sem;colon » Sun Jun 05, 2016 10:41 am

asselin wrote: I believe just changing the return FALSE to return TRUE should fix this.
Hi asselin,

did you test this?

Post Reply