Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easy way to check CTRL ALT SHIFT etc keys #279

Open
BenjaminDRichards opened this issue Aug 26, 2016 · 1 comment
Open

Easy way to check CTRL ALT SHIFT etc keys #279

BenjaminDRichards opened this issue Aug 26, 2016 · 1 comment
Milestone

Comments

@BenjaminDRichards
Copy link
Contributor

It would be nice to have properties on game.input.keyboard to quickly check the status of common toggle keys, e.g. game.input.keyboard.isShiftDown.

We can already check this on a per-game basis by setting up listeners for SHIFT-DOWN etc, but this entails an extra interface abstraction layer.

If we do this in-engine, we can also set up some robust handlers around it. For example, if we discover it gets stuck after ALT-TAB or COMMAND-TAB operations - which it might, because the keyup happens outside the browser - we can set up extra listeners for focus etc.

Worth investigating.

@BenjaminDRichards
Copy link
Contributor Author

Additional: There's currently no easy way to tell whether modifier keys are down at any given moment for pointers. I believe we can only get modifiers at the instance of pointerdown. Easy checks would let us do pointer work without having to build a keyboard abstraction layer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant