get-shortcut-prefix in selectable-menu-item<%>
Returns a list of symbols that indicates the keyboard prefix used for the menu item's keyboard shortcut. The allowed symbols for the list are the following:
'alt-- Meta (Windows and X only)'cmd-- Command (Mac OS X only)'meta-- Meta (X only)'ctl-- Control'shift-- Shift'opt-- Option (Mac OS X only)
Under X, at most one of 'alt and 'meta can be
supplied; the only difference between 'alt and 'meta
is the key combination's display in a menu.
The default shortcut prefix is available from
get-default-shortcut-prefix .
The shortcut key, as determined by
get-shortcut, matches a key event using either the normally reported key code or
the other-Shift/AltGr key code (as produced by
get-other-shift-key-code in key-event%, etc.). When the shortcut key is a key-code symbol or an ASCII letter or
digit, then the shortcut matches only the exact combination of
modifier keys listed in the prefix. For character shortcuts other than
ASCII letters and digits, however, then the shortcut prefix merely
determines a minimum set of modifier keys, because additional
modifiers may be needed to access the character; an exception is that,
under Windows or X, the Alt/Meta key press must match the prefix
exactly (i.e., included or not). In all
cases, the most precise match takes precedence; see
map-function in keymap% for more information on match ranking.
An empty list can be used for a shortcut prefix. However, the default
on-menu-char in frame% method checks for menu shortcuts only when the key event includes
either a non-Shift modifer or a Function key. Thus, an empty shortcut
prefix is normally useful only if the shortcut key is a Function key.
(-> list of symbols insenda-selectable-menu-itemget-shortcut-prefix)'(alt cmd meta ctl shift option)