HDS ViewStation System Administrator's Guide

A Hypertext Document


Using Event Translation Resources

This page describes event translation resources and how they can modify the keymappings for your application programs.

Event Translation Modifications
Event translation changes are local, rather than global, key modifications. They apply to one client or one window only. For instance, an email window might have F1 function as a "Send", while your word processor might have F1 function as "Save".

These definitions are all defined as resources of the client application itself. They are entered in the client's resource file ./app-defaults, or in your resource file .Xdefaults. It doesn't matter where the resource is defined (except for its global or single-user applicability), but you must be sure the resource is always read when the client starts. Click here for more general information about X Resources.

An event translation table is handled as if it were a single resource; the "override" indicates that only the following definitions override the default definitions. A sample translation table for Xterm might be:

XTerm*VT100.Translations: #override\
<Key>F1: string ("lpr -Pps") string (0x0d)\n\
<Key>F2: string ("xwd | xpr -device ps | lpr") string (0x0d)\n\
<Key>F3: string ("ls -C") string (0x0d)\n\
<Key>F4: string ("Mary Smith, Comptroller, XYZ Corporation")


Note these syntax requirements:
The resource needs the "#override\" entry to show they are new translations for these keys and override current definitions.

Strings are enclosed in parentheses; strings with spaces or special characters also need double quotation marks as delimiters.

Commands that require a carriage return for execution have the hex value for CR (0x0d) entered as a string at the end of the entry.

The table must be a single entry, so the \n\ must appear at the end of each line except the last.

This table is a single resource in your .Xresources file.

This example shows a number of applications for event translations. Note that the resource specification is for "Xterm*VT100" so it applies to all xterm clients that are started, but would not apply to other applications. The example shows some useful definitions, such as F1 doing a printer command, and F3 doing a list command. F4 prints a simple string for a frequently used phrase. F2 shows a more complicated command for a screen dump to a postscript printer. Test the commands before you use them.

Modifying HDSterm Keymappings
HDSterm event translations are handled by the ViewStation with some special considerations (Motif key bindings).

Return to Section Heading Page


Return to the Home Page

If you need more information than is available here, you can reach HDS via email at info@hds.com, or call us at 1.800.HDS.1551 in the USA, or at +610.277.8300 from outside the US. For questions or problems regarding the HDS WWW page, contact webmaster@hds.com.
© 1996 by HDS Network Systems Inc.