Fix hash of keyEvent being added to pressedKeys.
When we press a letter, lets say d is key is char value d and hash calculated using keyCodea and key is added to pressed keys. But when without release d, if we press SHIFT key, hash of shift key also being added to pressedKeys. Now, when we release d, it is actually now D hence key value change and when we try to remove new hash, it doesnot exist in pressedKeys and the old hash of d still stays in pressedKeys which was the cause of keyPressed returning true.
fixes #779
Hi @benfry
Hope you are doing well. I saw in your commit that you have included this pull request in todo.txt.
Does it mean you're going to have a look at it when you have time?
Yes, went to pull it in but realized that I needed to do additional testing… This is a really messy issue because of the way that different key combinations are posted as events (and there are differences to this between Java2D, OpenGL, and JavaFX as well) so it just needs more thorough work to make sure this is doing what we need. I suspect that this change doesn't fix the problem broadly enough, and want to make sure we have it right before altering something so fundamental.
Yes, that make sense.. I was also curious why | key was done in first place. Testing it more thoroughly make sense.
Yeah, it's because with any keystroke there may be a combination of key and keyCode, and those vary as different modifiers are applied. It's especially important in this scenario where we're trying to just detect what keys and modifiers are doing.