Manual pages › OPEN LOOK widgets (3W)
olVrtKeyBut(3W)
Virtual key/button
From the original Amiga UNIX 2.1 manual. Some things it mentions may not be in this release.
SYNOPSIS
#include <Intrinsic.h> #include <OpenLook.h> char *OlConvertVirtualTranslation(virtual_translation) char *virtual_translation;
DESCRIPTION
Converts Virtual Translations into Standard Translations
OlConvertVirtualTranslation() takes a virtual translation
string as input and returns a standard X Toolkit Intrinsic's
translation string. The function parses the input string
replacing any virtual key or button expressions with their
real representation(s). A virtual translation string has
the same format as a standard X Toolkit Intrinsics transla-
tion string, except that virtual expressions can appear as
modifiers or event types. (However, a virtual expression
cannot appear as an event type detail.)
Reference:
See "Appendix A" in the X Toolkit Intrinsics-C Language
Interface, X Window System, X Version 11, Release 2, for
more information on the translation string.
Virtual Expressions Virtual expressions are key or mouse button
names that are independent of any physical mapping of the key-
board or mouse buttons. For instance, MENU (which in this docu-
ment refers to the mouse button used to pop up menus) has the
virtual expression menuBtn in a virtual translation. If the end
user has assigned mouse button three to be MENU, then the OlCon-
vertVirtualTranslation() routine would convert a virtual transla-
tion that contains the expression menuBtn into a standard trans-
lation containing the expression Button3. The following is the
list of virtual expressions for the various keys and mouse but-
tons defined in the OPEN LOOK user interface. The left column
gives the name used in this document.
__________________________________
_Name__________Virtual_Expression_
ADJUST adjustBtn
CANCEL cancelBtn
CONSTRAIN constrainBtn
COPY copyKey
CUT cutKey
DUPLICATE duplicateBtn
HELP helpKey
MENU menuBtn
MENUDEFAULT menuDefaultBtn
NEXTFIELD nextFieldKey
PAN panBtn
PASTE pasteKey
PREVFIELD prevFieldKey
PROPERTY propertiesKey
SELECT selectBtn
STOP stopKey
UNDO undoKey
__________________________________
The following example illustrates a virtual translation that con-
tains three productions. (The Message production does not
involve any virtual translations but is included for illustra-
tion.) " ! selectBtn <selectBtnUp>: notify()|\n
<Message>:| checkClientMessage() \n
! <copyKeyDown>: copyToClipboard()"
| |
Space Allocated Only If Necessary If the input string does not
contain any virtual expressions, the original string is returned.
If the input string contains at least one valid |virtual produc-
tion, the function allocates memory for the returned string. The
application is|responsible for checking this difference and free-
ing the allocated memory, if appropriate. |
| |
Invalid Productions Dropped If the input string contains a valid
virtual production, any invalid virtual productions are not
included in the returned string. If the input string contains no
virtual productions, error checking is not done.|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |