From: Chris E. <chr...@co...> - 2004-12-09 12:40:43
|
I recently submitted a patch that begins to address the requested behavior: http://sourceforge.net/tracker/index.php?func=detail&aid=1080365&group_id=47038&atid=448268 It needs more extensions before onkeypress will create an event with the keycode set, but I think it's a good start. Didn't realize a patch was already in the tracker... David D.Kilzer wrote: > Note that this RFE now has a patch that provides a "framework" (in the > loosest sense of the word) for an event object. It even tries to give > you an MSIE event object when using an MSIE user agent. You'll have to > add the keyCode field to it, though. > > [ 948889 ] Support for fourth-generation event model > http://sourceforge.net/tracker/index.php? > func=detail&aid=948889&group_id=47038&atid=448269 > > I highly recommend reading this article when implementing event > handlers that use an 'event' object to make your JavaScript compatible > across MSIE and Mozilla/Firefox (and Safari and Opera). > > Supporting Three Event Models at Once > http://developer.apple.com/internet/webcontent/eventmodels.html > > Dave > > > On Dec 7, 2004, at 12:37 PM, Brad Clarke wrote: > >> It looks like the only key-press support that currently exists is for >> access keys. I >> suppose you could hack together some javascript to simulate this using >> HtmlPage.executeJavaScriptIfPossible(): >> >> <some code to make a window.event object since we don't seem to >> support that yet >> either> >> window.event.keyCode = <yourFKey>; >> HandleFnKeys(); >> >> >> --- "Brehm, Robert P" <rob...@of...> wrote: >> >>> All, >>> >>> I am implementing function key support as follows: >>> >>> <body ... onKeyDown="HandleFnKeys()" ... > >>> >>> and the javascript is as follows: >>> >>> function HandleFnKeys() { >>> var evt=window.event.keyCode; >>> switch (evt) { >>> case 112: //F1 >>> HandleSubmit(); >>> break; >>> case 113: //F2 >>> OpenExistingPO(); >>> break; >>> case 121: //F10 >>> HandleChoose(); >>> break; >>> }//switch >>> }//function >>> >>> I notice that the onKeyDown event by the documentation is not >>> implemented. Is >>> there any way around this to perform the function key support? >>> >>> Best Regards, >>> >>> Bob Brehm >>> Software Engineer >>> Xerox Corp. >>> >>> >>> ------------------------------------------------------- >>> SF email is sponsored by - The IT Product Guide >>> Read honest & candid reviews on hundreds of IT Products from real >>> users. >>> Discover which products truly live up to the hype. Start reading now. >>> http://productguide.itmanagersjournal.com/ >>> _______________________________________________ >>> Htmlunit-user mailing list >>> Htm...@li... >>> https://lists.sourceforge.net/lists/listinfo/htmlunit-user >>> >> >> >> >> ------------------------------------------------------- >> SF email is sponsored by - The IT Product Guide >> Read honest & candid reviews on hundreds of IT Products from real users. >> Discover which products truly live up to the hype. Start reading now. >> http://productguide.itmanagersjournal.com/ >> _______________________________________________ >> Htmlunit-user mailing list >> Htm...@li... >> https://lists.sourceforge.net/lists/listinfo/htmlunit-user > > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://productguide.itmanagersjournal.com/ |