unlimited undo's for text fields

Cubist at aol.com Cubist at aol.com
Mon Feb 28 18:33:04 CST 2005

sez scott at tactilemedia.com:
>>> 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.
>It is possible: the one way I could find to do this was to put a test for
>the shiftKey = down in a repeating loop.  Kind of a chore but it can work.
   How about this handler in the stack script:

on CheckModKeys
  set the ShiftState of this stack to the shiftKey
  set the OptionState of this stack to the optionKey
  set the CommandState of this stack to the commandKey
  set the ControlState of this stack to the controlKey
  send "CheckModKeys" to me in 25 milliseconds
  # if 40 updates per second is too quick or too slow for you,
  #   change "25" to an appropriate number
end CheckModKeys

   Start this puppy rolling in the openStack or preOpenStack handler, and 
whenever you need to know the state of a modifier key in ANY handler, refer to 
the appropriate "WhateverState of this stack" property.
   Sound like a usable workaround?

More information about the use-livecode mailing list