Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-10-2012, 12:18 AM   PM User | #1
Shaqcoulter
New to the CF scene

 
Join Date: Oct 2012
Posts: 6
Thanks: 3
Thanked 0 Times in 0 Posts
Shaqcoulter is an unknown quantity at this point
Exclamation KeyBinding and KeyListener for F11 (Fullscreen) - Please help!

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.
Shaqcoulter is offline   Reply With Quote
Old 10-10-2012, 12:40 AM   PM User | #2
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
Quote:
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.
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
AndrewGSW is offline   Reply With Quote
Users who have thanked AndrewGSW for this post:
Shaqcoulter (10-10-2012)
Old 10-10-2012, 12:53 AM   PM User | #3
Shaqcoulter
New to the CF scene

 
Join Date: Oct 2012
Posts: 6
Thanks: 3
Thanked 0 Times in 0 Posts
Shaqcoulter is an unknown quantity at this point
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.
http://thequietplaceproject.com/90seconds
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?
Shaqcoulter is offline   Reply With Quote
Old 10-10-2012, 01:31 AM   PM User | #4
AndrewGSW
Senior Coder

 
Join Date: Apr 2011
Location: London, England
Posts: 2,120
Thanks: 15
Thanked 354 Times in 353 Posts
AndrewGSW will become famous soon enough
I can't help you with tumblr, soz.

Quote:
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.
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
AndrewGSW is offline   Reply With Quote
Users who have thanked AndrewGSW for this post:
Shaqcoulter (10-10-2012)
Old 10-10-2012, 02:07 AM   PM User | #5
Shaqcoulter
New to the CF scene

 
Join Date: Oct 2012
Posts: 6
Thanks: 3
Thanked 0 Times in 0 Posts
Shaqcoulter is an unknown quantity at this point
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!
Shaqcoulter is offline   Reply With Quote
Reply

Bookmarks

Tags
actionmaps, help me, inputmaps, keybinding, keylisteners

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:26 PM.


Advertisement
Log in to turn off these ads.