It looks to me like it's a much more focused issue: the onKeyUp and down events 
allow a hotkey to fire before they are processed, so a discard return code for 
a hotkey doesn't stop WE from processing the hotkey.  In all other respects, 
the discard does seem to work; it's working in a script I'm using daily (since 
I'm not discarding a hotkey).
 
If you need to work around this, have a look at the application object's 
onHotKey event, which would allow you to discard a hotkey, and so your onKeyUp 
and down events would then work fine I think.
 
 
Chip
 


  _____  

From: MJ Williams [mailto:[email protected]] 
Sent: Thursday, June 14, 2012 8:13 PM
To: [email protected]
Subject: Re: OnKeyUp and OnKeyDown and scripted hotkeys ...


If i may be permitted to point out
the little test script I posted to the list earlier should produce the same 
result (or error) depending which way you look at it, that is to say, if I've 
understood Jeff's problem properly. It seems discarding or passing a key stroke 
will only concern programs other than Window-eyes running at the time of the 
event.
Regards
Matt


At 00:19 15/06/2012, you wrote:


Hi Jeff,
Do you have a code example of what you mean?.
Warm regards.
Martin Webster.
I.T. team leader for Kirklees visual impairment network.

--- On Thu, 6/14/12, Jeff Bishop <[email protected]> wrote:



From: Jeff Bishop <[email protected]>


Subject: OnKeyUp and OnKeyDown and scripted hotkeys ...


To: [email protected]


Date: Thursday, June 14, 2012, 8:59 PM



Hello GW Micro Gods,





  

It seems that if you tie a hotkey to a key, say like the letter r for example 
then this works fine. Let’s say you wish to hook the OnKeyUp and Down events 
for whatever reason and capture that same key but discard it and take an action 
on it. I can not get this to work. The scripted hotkey always fires even though 
the KeyDisposition is set to Discard and Silence (ored).





  

Is this expected? Meaning, if I tie a key to a script then it would always win 
due to it being bound prior to the OnKeyUp and Down events?





  

Jeff




 

Reply via email to