On Feb 28, 2005, at 5:00 PM, [EMAIL PROTECTED] wrote:

From: "J. Landman Gay" <[EMAIL PROTECTED]>
Subject: Re: unlimited undo's for text fields
To: How to use Revolution <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii; format=flowed

On 2/28/05 8:44 AM, Paul wrote:

I think Dar is right in that a message is not sent when a modifier key
is pressed on the Mac, but one can check to see if a modifier key is down.


So there is no good way to get a signal when the command key, shift key,
or option key are depressed alone if you need to trap for that behavior
on a Mac.


As for how other games do it -- I don't know. Scott Raney told me it
wasn't possible, because the OS sends no message. So I am not sure how
other game programs manage it.


They do it by "polling", i.e. they sit in a tight loop watching the keymap (an internal Mac data structure that has the status of all the keys on the keyboard).

FYI, there was a decision made, a long time ago (circa 1983), that the Mac event system would not report shift, option, command or control key downs to applications. The only way to determine if those keys are down is via polling, which can be done in Revolution by using an idle handler...

on idle
        if the shiftkey is down then
                ... do something
        end if
end idle

-- Frank

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


_______________________________________________ use-revolution mailing list [email protected] http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to