Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fullscreen with support to remote presentation controller #712

Merged
merged 2 commits into from
Feb 6, 2019

Conversation

giflw
Copy link
Contributor

@giflw giflw commented Jan 15, 2019

  • F5 to enter/exit
  • Escape to exit

var gc = api.lib.gc;
var util = api.lib.util;

gc.addEventListener( document, "keydown", function( event ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would make sense to have only a single event listener, since both of them are "keydown".

Also, I think with the current code "F5" would execute both enterFullscreen() and exitFullscreen().

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done changing to only one event listener. F5 indeed enter and exit full screen, as you requested earlier. It makes the behavior more intuitive when using keyboard, but allows the use of remote controller

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, F5 is used as the reload key in some popular browsers.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point, and this code will now override that functionality.

I think compatibility with remote controllers is a good argument in favor though. Other than that I have no strong opinion.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's more intuitive to use F5 in presentations to enter fullscreen. I catch myself trying that some times. Besides that, remote controllers works as keyboards and send F5 key to enter fullscreen. This way impress.js becomes more friendly to power point and other common users that have remote controls.
Regarding browser reload, CTRL+R it's another common way to reload, an this is not changed by impress.js.

@henrikingo henrikingo merged commit 97546a5 into impress:master Feb 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants