Jump to content

Fullscreen/Input Issue


xyrix
 Share

Recommended Posts

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

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...