unlimited undo's for text fields

Wouter wouter.abraham at scarlet.be
Mon Feb 28 12:26:28 EST 2005


Yeah, but Dar's bug entry is also pointing to some other illogical 
behavior in the way rawkeydown is working even on the Win32 platform.
Though rawkeydown is triggered by any of the modifier keys on Win32, 
you still have to poll for their keydown condition if combined with any 
other key. Which indeed is not very efficient.
It would be nice to have a more uniform behavior across platforms of 
these basic commands

And a polling loop on modifierkeys in rev-talk does sound like an 
unnecessary overload if it can be done more efficiently by the engine 
itself.

Gr,
Wouter

On 28 Feb 2005, at 15:44, 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.
>
> wouter.abraham at scarlet.be wrote:
>
>>> J. Landman Gay
>>> Sat, 26 Feb 2005 20:06:30 -0800
>>> On 2/26/05 2:07 PM, Dar Scott wrote:
>>
>>
>> snip
>>
>>>  Can't do it on a Mac. The OS doesn't send any messages for the 
>>> shift key and command key unless they are paired with an 
>>> alpha-numeric keypress. Windows OS does. Rev has no way of knowing 
>>> when the user depresses the shift key alone.
>>>
>>
>>
>> Weird because most games (red faction, jedi knight, unreal, quake, 
>> etc... ) on the mac succeed in this, why can't rev?
>>
>> Greetings,
>> Wouter
>>
>>

> 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
>
>



More information about the Use-livecode mailing list