counting keystrokes

Frank Leahy frank at backtalk.com
Tue Apr 26 05:19:56 EDT 2005


Sims,

The keymap was originally a Macintosh toolbox data structure that sat 
in low-memory, specifying which keys were currently down.  It was 
intended primarily to let the front-most app see if the user had 
multiple keys down simultaneously (e.g. ctrl-option-shift-delete), but 
like others before you, you've found that it's also possible to check 
for keys down from other than the front-most app.

Two comments:

1) It's possible that RunRev is merely simulating the Mac effect for 
Windows, by providing a keymap function that only works when RunRev is 
frontmost.  If this is the case, then your app will never see other app 
keystrokes on Windows.

2) I assume you realize that there's no guarantee that you'll see all 
keystrokes, even with your Mac version?  By calling "wait 10 millisecs 
with messages" you're assuming first, that keystrokes don't happen any 
faster than 10 milliseconds, and second, that your app will be given a 
time-slice every 10 milliseconds...either of these might be incorrect, 
resulting in lost keystrokes (though possibly not enough to matter).

Regards,
-- Frank

Web Photos Pro: Software for Photo Bloggers and Other Photo Power Users
See us on the web at http://www.webphotospro.com/

On Apr 26, 2005, at 8:07 AM, use-revolution-request at lists.runrev.com 
wrote:

> From: sims <sims at ezpzapps.com>
> Subject: Re: counting keystrokes
> To: How to use Revolution <use-revolution at lists.runrev.com>
> Message-ID: <p06200702be938278a3f3@[10.0.0.4]>
> Content-Type: text/plain; charset="us-ascii" ; format="flowed"
>
>> What if you make the window a systemWindow so that it is always at 
>> the front?
>
> Interesting idea...and if I don't want that window to show I could
> hide it somehow.
> I'll give that a try, thanks.
>
>> Actually, I am surprised that it works in any system. I would have
>> assumed that keystrokes only got passed to the front application no
>> matter what OS you were using :-)
>
> Surprised me also...but it works on OS X, at least with all the
> non-Rev apps I have
> and that includes Word.



More information about the use-livecode mailing list