CommandKeyDown handler question

Jerry Balzano gjbalzano at popmail.ucsd.edu
Fri Feb 4 15:33:48 EST 2005


Hi all,

As an old HyperCarder, I thought I'd like to set up commandKey 
equivalents in Rev for "go next card" and "go previous card" (cmd-3 and 
cmd-2 respectively).  After a couple false starts (e.g. using a keyDown 
handler with a "if the commandKey is down" inside), I hit on the 
following:

on commandkeyDown theKey
  switch theKey
   case "3"
     go next
     break
   case "2"
     go prev
     break
   default
     pass commandkeyDown
   end switch
end commandkeyDown

Now, the problem is, this doesn't work!  It does cause the Edit menu to 
do a mysterious brief hilite, but no card movement occurs.  However, 
when I change the handler about to a "controlKeyDown", everything is 
peachy.

So what's going on?  Is there some strange undocumented frontscripts 
behavior built into Rev that is intercepting my commandKeyDown handler? 
  Or what?

JerryB



More information about the use-livecode mailing list