Page 1 of 1

Keyboard plugin issue

Posted: Sun May 24, 2015 8:05 pm
by asselin
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!

Re: Keyboard plugin issue

Posted: Fri Oct 23, 2015 9:29 am
by pearbear
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.

Re: Keyboard plugin issue

Posted: Fri Oct 23, 2015 8:54 pm
by blackwind
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.

Re: Keyboard plugin issue

Posted: Sun Jun 05, 2016 10:41 am
by Sem;colon
asselin wrote: I believe just changing the return FALSE to return TRUE should fix this.
Hi asselin,

did you test this?