unlimited undo's for text fields

Frank Leahy frank at backtalk.com
Mon Feb 28 12:04:27 EST 2005

On Feb 28, 2005, at 5:00 PM, use-revolution-request at lists.runrev.com 

> From: "J. Landman Gay" <jacque at hyperactivesw.com>
> Subject: Re: unlimited undo's for text fields
> To: How to use Revolution <use-revolution at lists.runrev.com>
> Message-ID: <42234823.9000200 at hyperactivesw.com>
> 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 

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/

More information about the Use-livecode mailing list