VIRTUAL KEY/BUTTON(3
MI
W)
SC. REFERENCE MANUAL PA
VG
IE
RS
TUAL KEY/BUTTON(3W)
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
Amiga Unix Last change: 1
VIRTUAL KEY/BUTTON(3
MI
W)
SC. REFERENCE MANUAL PA
VG
IE
RS
TUAL KEY/BUTTON(3W)
UNDO undoKey
__________________________________
The following e
|xample illustrates a virtual trans
|lation that con-
tains three p
|roductions. (The Message produ
|ction does not
involve any vir
|tual translations but is included
| for illustra-
tion.) " ! selectBtn <selectBtnUp>: notify()|\n
<Message>:| checkClientMessage() \n
! <copyKeyDown>: copyToClipboard()"
| |
Space Allocated Only If Necessary If the input s
|tring does not
contain any vir
|tual expressions, the original str
|ing is returned.
If the input st
|ring contains at least one valid |virtual produc-
tion, the funct
|ion allocates memory for the retur
|ned string. The
application is|responsible for checking this diff
|erence and free-
ing the allocat
|ed memory, if appropriate. |
| |
Invalid Productions Dropped If the input string c
|ontains a valid
virtual produc
|tion, any invalid virtual prod
|uctions are not
included in the
| returned string. If the input st
|ring contains no
virtual product
|ions, error checking is not done.|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
Amiga Unix Last change: 2