Several questions about the Menu Mgr

Jeanne A. E. DeVoto jeanne at runrev.com
Sun Nov 17 05:16:22 EST 2002


At 8:06 PM -0800 11/12/02, Gareth Jones wrote:
>Now, about the other questions: can I specify a keyboard equivalent
>of a menu item that needs Command+Shiftkey+letter or a Function key
>(e.g. F2)?


You can write handlers to trap these keypresses (see the functionKey and
commandKey messages), but there's no way I know of as yet to have them
appear at the right edge of the menu as shortcuts. Your handler would look
like this:

  on commandKeyDown theKey
    if the shiftKey is down then
      switch theKey
      case "A"
        -- do whatever you want for command-shift-A
        break
      case "D"
        -- ...
      default
        pass commandKeyDown
      end switch
    else pass commandKeyDown
  end commandKey

--
Jeanne A. E. DeVoto ~ jeanne at runrev.com
Runtime Revolution Limited - The Solution for Software Development
http://www.runrev.com/





More information about the use-livecode mailing list