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
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?