xyrix Posted December 15, 2013 Share Posted December 15, 2013 Hi,I'm currently having an issue where I attach a request fullscreen function to "game.input.onDown.add", as it seems to need to be attached to an input function like this.However, this broke my game's ability to see keydown events for the keys A, S and D (but not the space bar or arrow keys).I tried attaching the "goFullscreen" function to document.onmousedown, but bizarrely get the same result :-/. Link to comment Share on other sites More sharing options...
rich Posted December 15, 2013 Share Posted December 15, 2013 Yeah, that's standard browser behaviour I'm afraid. "For security reasons, most keyboard inputs have been blocked in the fullscreen mode. However, in Google Chrome you can request keyboard support by calling the method with a flag:docElm.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);This does not work in Safari, and the method won’t be called.With Firefox, we are discussing and looking into various ways of how we we could add keyboard input support without jeopardizing the end user’s security. One suggestion, that no one has implemented yet, is therequestFullscreenWithKeys method, which in turn would trigger certain notifications for the user."https://hacks.mozilla.org/2012/01/using-the-fullscreen-api-in-web-browsers/ Link to comment Share on other sites More sharing options...
xyrix Posted December 15, 2013 Author Share Posted December 15, 2013 Ah, that's a shame :-/. Oh well - I'll attach a little warning note that it may not work as expected (I'll leave it in as it works in FireFox for me).Thanks for the answer . Link to comment Share on other sites More sharing options...
Recommended Posts