HyperCard: Menu with Shift or Command Key (7/92)

Although HyperCard does not directly support invoking menu commands that
involve keyboard modifiers (Shift and Command, for example) there are ways
to circumvent this limitation via HyperTalk. This article provides some
sample handlers.

This handler does the same thing as choosing Paste from the Edit menu:
on mouseUp
type "v" with commandKey
end mouseup

This handler does the same thing as choosing Cut from the Edit menu:
on mouseUp
type "x" with commandKey
end mouseup

This handler does the same thing as choosing Copy from the Edit menu:
on mouseUp
type "c" with commandKey
end mouseup


To invoke menu commands which involve keyboard modifiers, you would write a
script like this one, which does Shift-Command-Paste:
on mouseUp
type "v" with commandKey,shiftKey
end mouseup


This article is adapted from the Claris Tech Info database.
Published Date: Feb 19, 2012