Also use a variable that determines if quick nav keys are activated.There is a function and a flag for this, so run the function in FocusChangedEvent to set or unset the global flag, then use that flag as your first step in the condition statement in KeyPressedEvent. That makes it less intrusive on regular keypresses. Also check for FormsMode flag in that same condition so it doesn't activate if entering text in a form field.
Thanks, Dennis Brown----- Original Message ----- From: <chad.foster@xxxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx> Sent: Sunday, March 09, 2008 10:34 AMSubject: [jawsscripts] Re: Does any event trigger when you use the quick nav keys?
You should insert some logic into KeyPressedEvent to make sure your logic needs to fire, not just fire your logic every time this event is fired. So you would want to check for: (1) Is the nIsScriptKey parameter variable TRUE or FALSE? You only want to proceed if it is TRUE. (2) Is the Virtual PC cursor active? You should proceed if it is TRUE. (3) Is the KeyPressedEvent being fired from a quicknav key? You will need to write a function to determine if the current script key is a quicknav key combination. Note: use the length of the GetCurrentScriptKey function's return value, along with StringSegment using the plus sign (+) as the delimiter.(4) If all of these conditions are met, fire your logic, otherwise, return.Using the order I listed above minimizes overhead, since you are proceeding in the order of operations that use less memory up-front. --Chad On 3/8/08, Bryan Garaventa <bgaraventa11@xxxxxxxxxxxxxx> wrote:This won't work though, the script checks for a condition by queryingelements on a web page, then when the condition is found, a variable object for the DOM is stored, and a scheduled event runs to check on the conditionof a specific element every two seconds.If this script were triggered every time a key is pressed, it would be waytoo intrusive and would degrade performance. It does work if I attach the script to the main navigation commands like prior line, next line, paragraph, etc., but the only condition that getspast the script handler however, is when the quick nav keys are used to jumpdirectly into a form element, which doesn't look to trigger any sort of event like FocusChangeEvent, or FocusPointMovedEvent.If there isn't a basic event handler for this, then I guess I'll just haveto attach key assignments to e and f to check for the condition, then continue on to the quick nav command. It's a bit clunky like this though. ----- Original Message ----- From: <chad.foster@xxxxxxxxxx> To: <jawsscripts@xxxxxxxxxxxxx> Sent: Saturday, March 08, 2008 3:53 PMSubject: [jawsscripts] Re: Does any event trigger when you use the quick navkeys? > Bryan, check out KeyPressedEvent. > > > --Chad > > > On 3/8/08, Bryan Garaventa <bgaraventa11@xxxxxxxxxxxxxx> wrote:>> I'm trying to attach an event that runs when you use the quick nav >> keys>> such >> as F or E on a web page. Is there any event that deals with this? >> >> Thanks, >> >> Bryan >> >> __________ >> View the list's information and change your settings at >> //www.freelists.org/list/jawsscripts >> >> > > > -- > Chad Foster > Access Technology Solutions > http://www.GO-ATS.net > __________ > View the list's information and change your settings at > //www.freelists.org/list/jawsscripts > __________ View the list's information and change your settings at //www.freelists.org/list/jawsscripts-- Chad Foster Access Technology Solutions http://www.GO-ATS.net __________ View the list's information and change your settings at //www.freelists.org/list/jawsscripts
__________View the list's information and change your settings at //www.freelists.org/list/jawsscripts