| Allegro CL version 10.0 Unrevised from 9.0 to 10.0. 9.0 version |
Arguments: menu-item
Returns the value of the event-synonym property of the
argument menu-item
.
The value of this
property, if true, should be the key-chord that
will invoke this menu-item's command, assuming that the keyboard focus
is inside the window whose menu-bar contains this menu-item. An
event-synonym always contains a single main non-shift key, plus an
optional set of one or more shift keys. If no shift keys are used,
then the event-synonym consists entirely of a character name like #\A
or a key name like vk-comma or vk-f3. If shift keys are used, then the
event-synonym is a list whose members are the names of the shift keys
(in any order) and the main non-shift key as the last member. The
available shift key names are control-key
, alt-key
, and
shift-key
,
and they may be used in any combination.
Note that typable characters are normally used only with either control-key or alt-key (or both), since otherwise the characters would not be typable as text (since typing them would activate the menu item rather than entering the character). This is why the first two examples, though legal, are not recommended.
Here are some example event synonyms:
event-synonym is
a property of the menu-item
class.
See proxy-menu-bar-window, which can be used to redirect keyboard shortcuts to the menu-bar of another window. See cg-events.htm for information about event handling in Common Graphics.
Most of the keystrokes that combine a function key with the alt key (plus perhaps other shift keys) are grabbed either by Linux or by Gnome's default shortcuts, and Common Graphics cannot intercept them. For compatibility with existing Common Graphics code, Common Graphics will automatically map these keystrokes to other ones whenever they are specified as menu-item keyboard shortcuts. The general rule is that if a menu-item event-synonym includes both a function key and the alt key, then the corresponding numeral key is used on GTK instead of the function key. So alt-F1 will be converted automatically to alt-1, for example. As special cases, F10 maps to the zero key, F11 to the minus key, and F12 to the equals key. See also handle-f10.
Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 9.0 page.
Created 2015.5.21.
| Allegro CL version 10.0 Unrevised from 9.0 to 10.0. 9.0 version |