Re: How to capture function keys ?

2009-11-11 Thread hjo1620

My conclusion:

Non-colliding functionkey detection can be done (find keycodes per
browser in tables or by manual experimentation).
Colliding functionkey detection should be possible using browser
plugins.

No existing W3 spec for DOM events.
For now: least work/max browser support, use the GWT supplied keycode
constants,
convince the end-users they can use other keys, instead of
functionkeys.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: How to capture function keys ?

2009-11-10 Thread Jim Douglas

Read the linked articles.

On Nov 10, 12:40 am, hjo1620  wrote:
> Thanks for the reply.
> I did not read the supplied links, but I have read a number of
> messages in this newsgroup regarding tricky keycodes,
> however I have not seen a conclusion drawn from this.
>
> Is the conclusion that KeyCodes vary between browsers and are therefor
> not support in GWT ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: How to capture function keys ?

2009-11-10 Thread hjo1620

Nice idea.

I think the new "development mode" a.k.a. "hosted mode",
is implemented using plugins, so it might possibly be in the
sourcetree in a not too distant future.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: How to capture function keys ?

2009-11-10 Thread t.dave

i'm not 100% sure how this works, but will throw it out there in case
somebody knows or can figure it out.

the idea of a hot key was floated for my web app.  on a forum a guy
offered to create browser plugins for my app that would be able to
capture function keys.  here's some of the info he sent:


"For the suggestion of having a hotkey... if you expose a function to
do this in the pages javascript I can create Opera, FireFox, and IE
plugins for the site to provide this functionality."


"The principal works this way though, just as you embed a flash player/
movie into a website. You’d, for example, have this code embedded:



And voila! The plugin is now integrated with that
page! So with the plugin now embedded, I could expose some functions
for you to set what hotkeys are associated to JavaScript functions. So
for example you’d then have this code:





 var plugin = document.getElementById(‘appname-hotkey’);

 plugin.setHotKey(“F5”, “nextStep”);

 plugin.setHotKey(“F4”, “prevStep”);



That way whenever F4 or F5 are hit by themselves, they will go to the
next step and previous step respectively. This could integrate with
your back-end by allowing users to set their hot key preferences when
they login. The other perk is that you can easily embed detection if
the plugin is loaded, and if it isn’t do nothing. That way if the
plugin isn’t installed the page will behave as normal."

Anybody know anything about creating browser plugins?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: How to capture function keys ?

2009-11-10 Thread gwtfanb0y

I think that it is not possible to use KeyCodes which are used by the
Browser. The root-instance which handles
KeyCodes is the Browser, this is the application which controls
everything you can see. When the Browser
has hardcoded that F5 is for reloading the content, so you can't use
this Key with JavaScript. The Browser
will not sink this Key-Event to the content.

> Is the conclusion that KeyCodes vary between browsers and are therefor
> not support in GWT ?
Yes it is.


On 10 Nov., 09:40, hjo1620  wrote:
> Thanks for the reply.
> I did not read the supplied links, but I have read a number of
> messages in this newsgroup regarding tricky keycodes,
> however I have not seen a conclusion drawn from this.
>
> Is the conclusion that KeyCodes vary between browsers and are therefor
> not support in GWT ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: How to capture function keys ?

2009-11-10 Thread hjo1620

Thanks for the reply.
I did not read the supplied links, but I have read a number of
messages in this newsgroup regarding tricky keycodes,
however I have not seen a conclusion drawn from this.

Is the conclusion that KeyCodes vary between browsers and are therefor
not support in GWT ?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



Re: How to capture function keys ?

2009-11-09 Thread Jim Douglas

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  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 google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---



How to capture function keys ?

2009-11-09 Thread hjo1620

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 google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en
-~--~~~~--~~--~--~---