Merge pull request #461 from TN8001/some-keys-cannot-entered-OSK

Fix Some keys can't be entered on the On-Screen Keyboard #403
This commit is contained in:
Ben Fry
2022-04-21 13:50:19 -04:00
committed by GitHub

View File

@@ -131,6 +131,12 @@ public class DefaultInputHandler extends InputHandler {
int keyCode = evt.getKeyCode();
int modifiers = evt.getModifiersEx();
// Remove mouse button down masks that get mixed in with KeyEvent.
// https://github.com/processing/processing4/issues/403
modifiers &= ~(InputEvent.BUTTON1_DOWN_MASK |
InputEvent.BUTTON2_DOWN_MASK |
InputEvent.BUTTON3_DOWN_MASK);
// moved this earlier so it doesn't get random meta clicks
if (keyCode == KeyEvent.VK_CONTROL ||
keyCode == KeyEvent.VK_SHIFT ||