Hi Sean,

I don't like using the onKeyDown events of the keyboard object; you have the 
potential of slowing down all processing, as every keystroke would have to flow 
through your app to be "ok'ed" before it then gets passed onto other apps and 
programs.  This is the important difference between OnKeyDown and 
OnKeyProcessedDown, the processed version just gives you a copy of the key; you 
don't have the ability to stop other apps and programs from seeing that the key 
was pressed.  If you're doing this from the keyboard object, this is every 
single key press, so if you must have the ability to stop a key, at least 
define a key object, and then use these events from the key object instead of 
the keyboard object; it will take a lot of processing load off of your app.

I think I have a scripting class on nothing except ways to handle keystrokes, 
and it goes over all of these methods (except there a new hotkey type added by 
AI very recently, where you can specify the priority of your app).

Hth,

Chip






Chip Orange
Florida Public Service Commission
Computer Systems Analyst
850-413-6314



-----Original Message-----
From: Scripting 
[mailto:scripting-bounces+corange=psc.state.fl...@lists.window-eyes.com] On 
Behalf Of Sean Farrow via Scripting
Sent: Tuesday, March 29, 2016 3:58 PM
To: scripting@lists.window-eyes.com
Subject: Layered keystrokes
Importance: High

Hi,

I'm trying to create a script that uses a set of layered keystrokes. I have 
come up with a few ways of doing this:

Firstly use a hotkey and set a global variable, creating more hotkeys and 
checking whether the global variable is set in these keystroke handlers.

Secondly, I could use either the OnKeyDown or OnKeyProcessedDown methods of the 
Keyboard object. What is the difference between these two event handlers/when 
should each be used?

Is there any other way of doing this that I haven't thought about?
Any advice appreciated.
Kind regards
Sean.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://lists.window-eyes.com/private.cgi/scripting-window-eyes.com/attachments/20160329/54e45f05/attachment.htm>
_______________________________________________
Any views or opinions presented in this email are solely those of the author 
and do not necessarily represent those of Ai Squared.

For membership options, visit 
http://lists.window-eyes.com/options.cgi/scripting-window-eyes.com/corange%40psc.state.fl.us.
For subscription options, visit 
http://lists.window-eyes.com/listinfo.cgi/scripting-window-eyes.com
List archives can be found at 
http://lists.window-eyes.com/private.cgi/scripting-window-eyes.com
_______________________________________________
Any views or opinions presented in this email are solely those of the author 
and do not necessarily represent those of Ai Squared.

For membership options, visit 
http://lists.window-eyes.com/options.cgi/scripting-window-eyes.com/archive%40mail-archive.com.
For subscription options, visit 
http://lists.window-eyes.com/listinfo.cgi/scripting-window-eyes.com
List archives can be found at 
http://lists.window-eyes.com/private.cgi/scripting-window-eyes.com

Reply via email to