Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: Previous key state for repeat count in X11
Currently, as we've spoken in #69 @dcap has correctly pointed out that my patch has some problems with shift key modifier - and he was correct, I've skipped an important thing looking into this problem. So if we hold a key and the next event that will come will be different than the current one - it will reset repeat count. If it's shift for example, holding a trigger left mouse button on keyboard will correctly set the repeat count to 1, but as soon as we press shift during that for example, then it will bring the repeat count for the key to 0, since the new m_pressedKeySym will be equal to the shift button. Solution for that is to simply keep a map of states of the current keyboard - it will remember last state of the button that got pressed. So even if we will press Shift, and after that comes another event with the key that got mapped to left mouse button - we will check the last state of the mapped key, not shift for example.
- Loading branch information