Thanks again for this, Jeanne. Of course, since I'm mocking up a program's menus, the important thing for me is having the shortcut appear to the right of the menu item :-(. However, I'm clipping out your handler for future use.

-Gareth

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 ~ [EMAIL PROTECTED]
Runtime Revolution Limited - The Solution for Software Development
http://www.runrev.com/


_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution
_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to