Virtual Key/Button(3W) UNIX System V Virtual Key/Button(3W)
NAME
Virtual_Key/Button: OlConvertVirtualTranslation - takes a virtual
translation string as input and returns a Standard X Toolkit translation
string
Note: this routine is obsolete since translation tables cannot support
dynamic rebinding of keys and buttons. OlLookupInputEvent() should be
used instead.
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 translation
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,, 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 keyboard or mouse buttons. For instance,
MENU (which in this document 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
OlConvertVirtualTranslation() routine would convert a virtual translation
that contains the expression menuBtn into a standard translation
containing the expression Button3.
The following is the list of virtual expressions for the various keys and
mouse buttons defined in the OPEN LOOK user interface. The left column
gives the name used in this document.
10/89 Page 1
Virtual Key/Button(3W) UNIX System V Virtual Key/Button(3W)
___________________________________________________________
| Name | Virtual Expression| Virtual Event |
|________________|____________________|____________________|
___________________________________________________________
ADJUST adjustBtn OL_ADJUST
___________________________________________________________
ADJUSTKEY adjustKey OL_ADJUSTKEY
___________________________________________________________
CANCEL cancelKey OL_CANCEL
___________________________________________________________
CHARBACK charBakKey OL_CHARBAK
___________________________________________________________
CHARFWD charFwdKey OL_CHARFWD
___________________________________________________________
CONSTRAIN constrainBtn OL_CONSTRAIN
___________________________________________________________
COPY copyKey OL_COPY
___________________________________________________________
CUT cutKey OL_CUT
___________________________________________________________
DEFAULTACTION defaultActionKey OL_DEFAULTACTION
___________________________________________________________
DELCHARBACK delCharBakKey OL_DELCHARBAK
___________________________________________________________
DELCHARFWD delCharFwdKey OL_DELCHARFWD
___________________________________________________________
DELLINE delLineKey OL_DELLINE
___________________________________________________________
DELLINEBACK delLineBakKey OL_DELLINEBAK
___________________________________________________________
DELLINEFWD delLineFwdKey OL_DELLINEFWD
___________________________________________________________
DELWORDBACK delWordBakKey OL_DELWORDBAK
___________________________________________________________
DELWORDFWD delWordFwdKey OL_DELWORDFWD
___________________________________________________________
DOCEND docEndKey OL_DOCEND
___________________________________________________________
DOCSTART docStartKey OL_DOCSTART
___________________________________________________________
DOWN downKey OL_DOWN
___________________________________________________________
DRAG dragKey OL_DRAG
___________________________________________________________
DROP dropKey OL_DROP
___________________________________________________________
DUPLICATE duplicateBtn OL_DUPLICATE
___________________________________________________________
DUPLICATEKEY duplicateKey OL_DUPLICATEKEY
___________________________________________________________
HELP helpKey OL_HELP
___________________________________________________________
Page 2 10/89
Virtual Key/Button(3W) UNIX System V Virtual Key/Button(3W)
___________________________________________________________
| Name | Virtual Expression| Virtual Event |
|________________|____________________|____________________|
HORIZSBMENU horizSDMenuKey OL_HSBMENU
___________________________________________________________
LEFT leftKey OL_LEFT
___________________________________________________________
LINEEND lineEndKey OL_LINEEND
___________________________________________________________
LINESTART lineStartKey OL_LINESTART
___________________________________________________________
MENU menuBtn OL_MENU
___________________________________________________________
MENUKEY menuKey OL_MENUKEY
___________________________________________________________
MENUDEFAULT menuDefaultBtn OL_MENUDEFAULT
___________________________________________________________
MENUDEFAULTKEY menuDefaultKey OL_MENUDEFAULTKEY
___________________________________________________________
NEXTAPP nextAppKey OL_NEXTAPP
___________________________________________________________
NEXTFIELD nextFieldKey OL_NEXT
___________________________________________________________
NEXTWINDOW nextWinKey OL_NEXTWINDOW
___________________________________________________________
PAGEDOWN pageDownKey OL_PAGEDOWN
___________________________________________________________
PAGELEFT pageLeftKey OL_PAGELEFT
___________________________________________________________
PAGERIGHT pageRightKey OL_PAGERIGHT
___________________________________________________________
PAGEUP pageUpKey OL_PAGEUP
___________________________________________________________
PAN panBtn OL_PAN
___________________________________________________________
PANEEND paneEndKey OL_PANEEND
___________________________________________________________
PANESTART paneStartKey OL_PANESTART
___________________________________________________________
PASTE pasteKey OL_PASTE
___________________________________________________________
PREVAPP prevAppKey OL_PREVAPP
___________________________________________________________
PREVFIELD prevFieldKey OL_PREV
___________________________________________________________
PREVWINDOW prevWinKey OL_PREVWINDOW
___________________________________________________________
PROPERTY propertiesKey OL_PROPERTY
___________________________________________________________
RIGHT rightKey OL_RIGHT
___________________________________________________________
ROWDOWN rowDownKey OL_ROWDOWN
10/89 Page 3
Virtual Key/Button(3W) UNIX System V Virtual Key/Button(3W)
___________________________________________________________
| Name | Virtual Expression| Virtual Event |
|________________|____________________|____________________|
___________________________________________________________
ROWUP rowUpKey OL_ROWUP
___________________________________________________________
SCROLLBOTTOM scrollBottomKey OL_SCROLLBOTTOM
___________________________________________________________
SCROLLDOWN scrollDownKey OL_SCROLLDOWN
___________________________________________________________
SCROLLLEFT scrollLeftKey OL_SCROLLLEFT
___________________________________________________________
SCROLLLEFTEDGE scrollLeftEdgeKey OL_SCROLLLEFTEDGE
___________________________________________________________
SCROLLRIGHT scrollRightKey OL_SCROLLRIGHT
___________________________________________________________
SCROLLRIGHTEDGE scrollRightEdgeKey OL_SCROLLRIGHTEDGE
___________________________________________________________
SCROLLTOP scrollTopKey OL_SCROLLTOP
___________________________________________________________
SCROLLUP scrollUpKey OL_SCROLLUP
___________________________________________________________
SELECT selectBtn OL_SELECT
___________________________________________________________
SELECTKEY selectKey OL_SELECTKEY
___________________________________________________________
SELECTCHARBACK selCharBakKey OL_SELCHARBAK
___________________________________________________________
SELECTFLIPENDS selFlipEndsKey OL_SELFLIPENDS
___________________________________________________________
SELECTLINE selLineKey OL_SELLINE
___________________________________________________________
SELECTLINEBACK selLineBakKey OL_SELLINEBAK
___________________________________________________________
SELECTWORDBACK selWordBakKey OL_SELWORKBAK
___________________________________________________________
SELECTCHARFWD selCharFwdKey OL_SELCHARFWD
___________________________________________________________
SELECTLINEFWD selLineFwdKey OL_SELLINEFWD
___________________________________________________________
SELECTWORDFWD selWordFwdKey OL_SELWORDFWD
___________________________________________________________
STOP stopKey OL_STOP
___________________________________________________________
TOGGLEPUSHPIN togglePushpinKey OL_TOGGLEPUSHPIN
___________________________________________________________
UNDO undoKey OL_UNDO
___________________________________________________________
UP upKey OL_UP
___________________________________________________________
VERTSBMENU vertSBMenuKey OL_VSBMENU
___________________________________________________________
Page 4 10/89
Virtual Key/Button(3W) UNIX System V Virtual Key/Button(3W)
___________________________________________________________
| Name | Virtual Expression| Virtual Event |
|________________|____________________|____________________|
| WINDOWMENU | windowMenuKey | OL_WINDOWMENU |
|________________|____________________|____________________|
| WORDBACK | wordBakKey | OL_WORDBAK |
|________________|____________________|____________________|
| WORDFWD | wordFwdKey | OL_WORDFWD |
|________________|____________________|____________________|
| WORKSPACEMENU | workspaceMenuKey | OL_WORKSPACEMENU |
|________________|____________________|____________________|
The following example illustrates a virtual translation that contains
three productions. (The Message production does not involve any virtual
translations but is included for illustration.)
" ! 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 production, the function allocates memory for the returned
string. The application is responsible for checking this difference and
freeing 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.
SEE ALSO
OlLookupInputEvent(3W)
10/89 Page 5