looking for a way to fire the F11 key event

Showing 1-3 of 3 messages
looking for a way to fire the F11 key event David 11/9/11 5:49 AM
Most browsers have a built in fullscreen mode via the F11 key.
I have a requirement to add a "full screen mode" button to my gwt app
and am looking for a way to fire the F11 Event


F11_KEY = 122;

NativeEvent f11Event = Document.get().createKeyPressEvent(false,
false, false, false, F11_KEY);

Both of these solutions don't seem to work:
    1)   DomEvent.fireNativeEvent(f11Event, this);
    2)   ..getElement().dispatchEvent(f11Event);


Has anyone tried this before?

Thanks
David
Re: looking for a way to fire the F11 key event Paul Robinson 11/9/11 6:10 AM
This is really about what you can do from javascript. See:
http://stackoverflow.com/questions/1125084/how-to-make-in-javascript-full-screen-windows-stretching-all-over-the-screen

and

http://stackoverflow.com/questions/7495373/how-to-make-browser-full-screen-using-f11-key-event-through-javascript

which seem to suggest you can't do it.

Paul

Re: looking for a way to fire the F11 key event Thomas Broyer 11/9/11 6:22 AM
Simply put: you can't. See https://wiki.mozilla.org/Gecko:FullScreenAPI for the rationale.

You'll see however at the very end of that page that Firefox and WebKit (Safari and Chrome, and many more) have implemented the proposed API: