looking for a way to fire the F11 key event

2,399 views
Skip to first unread message

David

unread,
Nov 9, 2011, 8:49:12 AM11/9/11
to Google Web Toolkit
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

Paul Robinson

unread,
Nov 9, 2011, 9:10:41 AM11/9/11
to google-we...@googlegroups.com

Thomas Broyer

unread,
Nov 9, 2011, 9:22:24 AM11/9/11
to google-we...@googlegroups.com
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:
Reply all
Reply to author
Forward
0 new messages