View Full Version : KeyBinding and KeyListener for F11 (Fullscreen) - Please help!

10-10-2012, 01:18 AM
Hi, and thanks for stopping by.
I'm completely new to this forum, but I didn't know where else to turn to.
What I want to do is force the user to enter fullscreen as soon as they enter, and I want them to be the one that presses it.
This is the order in what I'm trying to create.

1. User enters webpage and sees the words "Fullscreen to continue" on a black background.
2. User presses F11 (fullscreen) and the words melt away to enter the site.
3. If the User exits fullscreen while on my site, the words "Please enter fullscreen to continue viewing" would pop up, and they would have to enter fullscreen again.

This is for simple viewing pleasure, but it'll be very effective if it works.

Thank you so much in advance. I'm very new to Javascript and coding in general, so sorry if I am in the wrong niche or this is too advanced or something. I've read about KeyListeners and KeyBindings and ActionMaps and InputMaps but it's all bloody chinese to me.

10-10-2012, 01:40 AM
is force the user to enter fullscreen

I don't know about anyone else, but if I saw this "request" I would immediately leave the site. I think you should "request", which wouldn't require any JavaScript.

If you wish to pursue this, though, then you should investigate, for example, the keydown event.

10-10-2012, 01:53 AM
Thank you for the quick response.
Yeah actually you're probably right. I didn't really think. Maybe instead it would allow the menu to popup/fade in? If you need clarification it's for my Tumblr Blog. I was looking to spice it up a little bit to attract a bit more traffic.

I was thinking like as in this site here.
Because when the spacebar is pressed, the words fade out and fly in from the top. It would awesome if I could somehow implement this in, but instead the F11 button would be the space bar.

What is a KeyDown?

10-10-2012, 02:31 AM
I can't help you with tumblr, soz.

What is a KeyDown?

No offence, but if your knowledge of JavaScript is limited then I don't know how you are going to achieve this. Perhaps there is some kind of similar tumblr feature that you can plug-into.. otherwise you'll need to employ someone to do this for you.

10-10-2012, 03:07 AM
Again, you're probably right. It was an ambitious project that I was wanting to try and I guess I overextended, due to the fact that I don't know **** about Javascript :/
No worries though, thanks for trying.
If anyone has any ideas please please comment!