F1..F12 will probably return values of 112..123. But overall, JavaScript key events are...interesting. Read this warning as "here there be dragons":
http://google-web-toolkit.googlecode.com/svn/javadoc/1.6/com/google/gwt/event/dom/client/KeyEvent.html "Base class for Key events. The native keyboard events are somewhat a mess (http://www.quirksmode.org/js/keys.html), we do some trivial normalization here, but do not attempt any complex patching, so user be warned." PPK is a good starting point: http://www.quirksmode.org/js/keys.html And this article+test script are also excellent: http://unixpapa.com/js/key.html http://unixpapa.com/js/testkey.html On Nov 9, 9:32 pm, hjo1620 <[email protected]> wrote: > I can't find function keys (F1 - F12) in KeyCodes.* > > Instead of: > NativePreviewHandler handler = new NativePreviewHandler() { > @Override > public void onPreviewNativeEvent(NativePreviewEvent > event) { > if (event.getTypeInt() == Event.KEY_DOWN) { > > } > > } > }; > Event.addNativePreviewHandler(handler); > > I would like to say: > if (event.getTypeInt() == Event.F12) { > > } > > Am I missing something obvious, or is this not possible ? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
