Closed EvanBurchard closed 10 years ago
Agreed - maybe just a toggle that only eats the bound keys (i.e. if you have 'left' and 'right' bound - eat those, otherwise let them be)
I put a conditional on the keydown event to allow shortcuts with the Ctrl key: https://github.com/Bitshock/Quintus/commit/15e9c25d92b9afb7233a5b4735d0e6cdeb3583fe
When playing a game, not being able to switch tabs or refresh the page while the game has focus is pretty sensible. In development, it's a bit cumbersome.
It would be nice if there was an easy hook to toggle the "e.preventDefault()" lines inside of the "enableKeyboard" function declaration of quintus_input.js.
Currently, I'm just commenting out those lines in development. Autodetecting a production vs. dev mode seems like overkill. Ideally, I'd just set this option somewhere in my game file. Maybe something like Q.input.allowDefaultKeyBehavior = true; or something.