Technical Bulletin

Product: RUMBA OFFICE 2.0 RUMBA for UNIX RUMBA for the VAX Version #: See above Host: UNIX, VAX

Summary If you find that one or more of the keys you press in RUMBA for the VAX or RUMBA for UNIX doesn't produce the effect you expect, it may be that there is a mismatch between how the keyboard is mapped in RUMBA software and how the keys are mapped on the host. By remapping the characters that a key sends, RUMBA software can emulate most keyboards and be made to work with almost any application.

When a key is pressed one of two things can happen. If the key defines a "local function," RUMBA software performs that function and nothing is sent to the host. One local function is the F2 or PrintScreen key. This function does not require host interaction. RUMBA software simply copies the information from the screen to the printer. If the key does not define a local function then RUMBA will send either a single character or a string of characters to the host. This document describes how to change the character or string of characters sent by RUMBA software when a key is pressed. It also covers some basic ways to determine what the host or application expects. To effectively fix key mapping problems, you will need to talk with your system administrator and possibly with the vendor of the host application you are using. Keyboard Mapping Host applications are written for a specific host keyboard. In the case of DEC and UNIX applications, this keyboard is usually a VT keyboard. When you access the host using RUMBA for the VAX or RUMBA for UNIX, your PC keyboard emulates the VT keyboard, using single keys and combinations of keys to produce the VT keyboard commands. This is called keyboard mapping; PC keys and key combinations are "mapped" to VT keyboard functions. With RUMBA software, you can specify how the VT commands are mapped to your PC keyboard.

For more information about this topic, see the Administrator's Guide for RUMBA for the VAX, or your host computer's keyboard mapping information. For advanced information about the file in UNIX that stores keyboard strings (generally, the file name is "termcap"), see the end of this document.

NetManage, Inc. www.netmanage.com

Technical Bulletin

Changing Keyboard Mapping In RUMBA software, it is easy to change the character or string of characters sent by a particular key. To change a keyboard mapping, 1) Select Options/Keyboard, then choose Keyboard Strings from the list box located under the keymap.

Figure 1. The default keyboard map.

2) Select the Add String button in the lower left hand corner, and the Add Keyboard String dialog box will appear.

3304.DOC Page 2

Technical Bulletin

Figure 2. The Add Keyboard String dialog.

The Characters To Enter text box is where the string will be defined. Below this text box is a list of extended or control characters that can be inserted into the string. By selecting a character from the list and selecting the Insert button, special characters can be added to the text box (items can also be added by double clicking on them). Once the string has been defined, click OK to return to the keyboard map. At this point, the character string has been defined but it has not been mapped to a key. The string just defined should appear in the list box in the lower left hand corner of the keyboard mapping dialog box. 3) To map this string to a particular key or key combination, select the Add button in the lower right hand corner of the dialog box (in the Mapped to... section). Use the mouse to select a key or combination of keys. Selecting the Accept button will map the string to the highlighted key(s). If the key has been previously defined, then an OverWrite Warning dialog box will appear.

Figure 3. The OverWrite Warning! box warns you when you are overwriting the mapping of a previously defined key.

Selecting OK will allow the process to continue and will replace the original key definition with the new string.

3304.DOC Page 3

Technical Bulletin

Figure 4. The keyboard mapping dialog box with the F1 key remapped as OP.

4) Repeat steps 2 through 4 for each key that you would like to remap. 5) Once the complete keyboard map has been defined, select File/Save to save this keyboard definition into a .MAP file. This file can be copied to multiple installations of RUMBA software, so this mapping process should only have to be done once. 6) Choose File/Exit to return to the main RUMBA screen. 7) Remember to save the profile (from the RUMBA menu, select File/Save) to associate the keyboard map file and the profile permanently. If the map file is copied to another workstation, it can be loaded using the following procedure. 1) Select Options/Keyboard from the RUMBA main menu. 2) Select File/Open from the keyboard map. 3) Select the previously defined .MAP file. 4) Select File/Exit to return to the RUMBA main screen. 5) Select File/Save from the RUMBA menu to associate the keyboard map file and the profile permanently.

3304.DOC Page 4

Technical Bulletin

Determining Mapped Keyboard Strings in RUMBA Software

NOTE: Versions of RUMBA for the VAX before version 1.1 did not support keyboard strings.

To see how the strings are mapped in RUMBA software by default, look in the on-line help under the topic Codes Sent by Keyboard Keys. If the keyboard strings on your PC have been remapped from the default, you may have to examine each key individually. To do so, 1) Select the Options/Keyboard command. 2) Click Add, then click the key on the keyboard diagram that needs to be identified. 3) Click Accept. Since the key is already mapped to a string, you will get a warning message.

Figure 5. When mapping a key to a new keyboard string, you get a message like this if the key is already mapped.

The string or VT function to which the key is mapped is displayed in this dialog box. Select Cancel and repeat this process for each key that needs to be identified. The keyboard strings are defined in a .STR file, but the key names are not defined.

User-Defined Keys Remapping keyboard strings as described previously is the preferred way to reassign values to keys. However, you can also create User-Defined Keys to map keyboard strings in RUMBA for the VAX and RUMBA for UNIX. Creating User-Defined Keys is the only method available for versions of RUMBA for the VAX prior to version 1.1. RUMBA for the VAX and RUMBA for UNIX support up to 14 User-Defined Keys (UDKs). You can define a UDK as a string of regular characters and/or control characters. UDKs are similar to keyboard strings. User Defined Keys are host-programmable; the host application can program UDK #6 to send a particular string whenever you press the key to which UDK #6

3304.DOC Page 5

Technical Bulletin

is mapped. The host does not redefine the keystrokes that represent UDK #6; it defines the string sent whenever UDK #6 is pressed. That is, if RUMBA software has defined UDK #6 as Shift-F6 and the host defines UDK #6 as the OP string, then OP will be sent whenever Shift-F6 is pressed. The host could change the OP string to a different string, in which case the new string would be sent whenever Shift-F6 was pressed. You can prevent the host from redefining the UDKs by selecting Options/Terminal/Advanced, then selecting Lock User-Defined Keys in the dialog box. UDKs are normally mapped to Shift-F6 through Shift-F12, and Ctrl-Alt-Shift-F1 through Ctrl-Alt-Shift-F10, but these key(s) can be remapped to generate a particular UDK. Because UDKs can be mapped to or key combination and the string sent can be defined by RUMBA software, UDKs can be made to act like keyboard strings. To create a UDK, 1) Select Options/Keyboard, then select User Defined Keys from the list box below the key map. Click UDK Setup. 2) In the UDK Setup dialog box, select a UDK from the list box. Define the string you want to send with that key by typing regular characters and/or control characters, or by selecting control characters from the Characters To Send list and clicking Insert. 3) Define all the UDKs you want, then click Close to return to the keyboard map. 4) At this point the strings have been defined, but not mapped to any keys. Select a UDK from the list box. If a string has been mapped to a key combination, that will show in the Mapped to... section. You can add a key combination or change the existing mapping if you like. Click Add on the right hand side in the Mapped to... section to add a mapping, or click Change to change the one shown. 5) Using the mouse to click keys on the keyboard map shown in the dialog box, select the key or key combination (such as Alt and F1) to map the string to and click Accept. 6) Save this map and return to the display. The key should now send the keyboard string you have defined. Remember to save the profile to associate the keyboard map file and the profile permanently.

Dynamic Keyboard Mapping The AUTOKBD.INI file is used to dynamically change the keyboard map in RUMBA for the VAX and RUMBA for UNIX. Below is an example of the

3304.DOC Page 6

Technical Bulletin

AUTOKBD.INI file. The version of AUTOKBD.WP that ships with RUMBA software must be renamed to AUTOKBD.INI for the dynamic keyboard mapping to occur. The following example shows how to use the keyboard map for WordPerfect. However, you can create keyboard maps for other host applications that require their own maps. Ask the application vendor for the keyboard map that the application uses, then create a new map (Options/Keyboard/File/New) using the instructions given in the Keyboard Strings section above. Sample AUTOKBD.INI file entry:

[AUTOLOADKBD] KBDNum = 1 KBDLoad1 = 1mWordPerfect8Cm KBDUnload1 =Yes?25l KBDMap1 = wp.map When RUMBA software receives the string 1mWordPerfect8Cm it will switch the keyboard map from the current one to the one specified in the line beginning KBDMap1, which in this case is the file WP.MAP. When RUMBA software receives the string Yes?25l it will unload WP.MAP and reload the previous map.

The Key If the backspace key is not functioning properly, the following procedure may help. Select Options/Terminal/Keyboard and set “Send <- as” to either Backspace or Delete. Advanced UNIX Keyboard Mapping for System Administrators There is a file on a UNIX host (generally found in /etc/termcap), that contains keyboard values. While not all applications obey the termcap file on the host, most do, and the values for any key can be determined by looking here. By default, the RUMBA keyboard maps the F1 key to the VT function HOLD. This is a local function, meaning it is not necessary to notify the host of a keypress. The function can be performed locally. Some host applications use the F1 key differently. They expect to be notified when the user presses the F1 key. Looking at the termcap information in the host manual, the symbol k1

3304.DOC Page 7

Technical Bulletin

represents the 1. The termcap file has k1=\EOP. The \E represents the escape character. Using RUMBA keyboard mapping it is possible to remap the F1 key to OP. Now instead of performing a local HOLD function when the user presses F1, OP will be sent to the host.

NOTE: The host application can change these settings or ignore the termcap file altogether.

Example Entries for the Host termcap File The termcap file contains entries placed one after another, without line breaks. A single key mapping entry, for k1, is highlighted in the text below. Each entry begins with a colon. If a key isn't working for you, look in the tables following this section for the key function you are expecting. The first column in that table will show you the key as it is listed in the termcap file. Then look at the termcap file on your host and find that key. If it has a string assigned to it, copy that string and, in RUMBA for UNIX, map your PC key to the correct string. The termcap file may contain entries for many different terminal types. To find the correct entry for your terminal type, you can type the set command at the prompt and checking the value of the term= line to find your terminal type (for example, term=vt102). Look through the termcap file and locate the section for that terminal type. The terminal type should also match the term environment variable. If you do not find your terminal type in the termcap file, contact your system administrator for more information. The following sample of a termcap file shows entries for two different terminal types, a vt102 terminal and a vt320 terminal. Both terminal types and both k1 mappings are bolded in this example.

3304.DOC Page 8

Technical Bulletin

# vt102 - vt100 + insert line etc. v2|vt102|DEC vt102 compatible:\ :co#80:li#24:is=\E[m\E[?1l\E>:rs=\E[m\E[?1l\E>:eA=\E)0:as=^N:ae=^O:\ :ac=aaffggjjkkllmmnnooqqssttuuvvwwxx:ks=:ke=:k1=\EOP:k2=\EOQ:k3=\EOR:\ :k4=\EOS:bs:mi:ms:nw:pt:xn:xo:it#8:RA=\E[?7l:SA=\E?7h:bl=^G:cr=^M:\ :ta=^I:cm=\E[%i%d;%dH:le=^H:ri=\E[C:up=\E[A:do=\E[B:nd=\E[C:LE=\E[%dD:\ :RI=\E[%dC:UP=\E[%dA:DO=\E[%dD:ho=\E[H:cl=\E[H\E[2J:ce=\E[K:cb=\E[1K:\ :cd=\E[J:sf=\ED:sr=\EM:ct=\E[3g:st=\EH:cs=\E[%i%d;%dr:sc=\E7:rc=\E8:\ :ei=\E[4l:ic=\E[@:IC=\E[%d@:al=\E[L:AL=\E[%dL:dc=\E[P:DC=\E[%dP:\ :dl=\E[M:DL=\E[%dM:so=\E[7m:se=\E[m:us=\E[4m:ue=\E[m:mb=\E[5m:mh=\E[2m:\ :md=\E[1m:mr=\E[7m:me=\E[m:kb=\177:ku=\E[A:kd=\E[B:kr=\E[C:kl=\E[D: # Standard vt320 v3|vt320|DEC vt320:\ :co#80:li#24:hs:es:is=\E[m\E[2$~\E[?1l\E>:rs=\E[m\E[?1l\E>:ve=\E[?25h:\ :vi=\E[?25l:se=\E[27m:ue=\E[24m:mh=\E[2m:eA=\E)0:as=^N:ae=^O:\ :ac=aaffggjjkkllmmnnooqqssttuuvvwwxx:ts=\E[1$}\E[1;%i%dH:fs=\E[0$}:\ :ds=\E[1$}\r\E[m\E[K\E[0$}:ks=:ke=:kI=\E[2~:kD=\E[3~:kP=\E[5~:kN=\E[6~:\ :k?=\E[28~:%1=\E[28~:@4=\E[29~:@0=\E[1~:*6=\E[4~:k1=\EOP:k2=\EOQ:\ :k3=\EOR:k4=\EOS:k5=\E[16~:k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:\ :k0=\E[21~:F1=\E[23~:F2=\E[24~:F3=\E[25~:F4=\E[26~:F5=\E[28~:F6=\E[29~:\ :F7=\E[31~:F8=\E[32~:bs:mi:ms:nw:pt:xn:xo:it#8:RA=\E[?7l:SA=\E?7h:\ :bl=^G:cr=^M:ta=^I:cm=\E[%i%d;%dH:le=^H:ri=\E[C:up=\E[A:do=\E[B:\ :nd=\E[C:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:DO=\E[%dD:ho=\E[H:cl=\E[H\E[2J:\ :ce=\E[K:cb=\E[1K:cd=\E[J:sf=\ED:sr=\EM:ct=\E[3g:st=\EH:cs=\E[%i%d;%dr:\ :sc=\E7:rc=\E8:ei=\E[4l:ic=\E[@:IC=\E[%d@:al=\E[L:AL=\E[%dL:dc=\E[P:\ :DC=\E[%dP:dl=\E[M:DL=\E[%dM:so=\E[7m:us=\E[4m:mb=\E[5m:md=\E[1m:\ :mr=\E[7m:me=\E[m:kb=\177:ku=\E[A:kd=\E[B:kr=\E[C:kl=\E[D:

Sample Values for Setting Keyboard Strings in the Host termcap File File head line for 80-character mode: : vt|vt101|DEC VT 101 terminal in 80 character mode:\ File head line for 132-character mode: : Vt|vt101-w|DEC VT 101 terminal in (wide) 132 character mode:\ Indicate Boolean strings like this: :bs:\ Indicate Numeric strings like this: :co#80:\ Indicate String strings like this: :sr=\E[H:\

3304.DOC Page 9

Technical Bulletin

Strings with Boolean Capabilities String Effect of String 5i Printer will not echo on screen am Automatic margins (which means automatic line wrap) bs Control-H (8 dec.) performs a backspace bw Backspace on left margin wraps to previous line and right margin da Display retained above screen db Display retained below screen eo A space erases all characters at position es Escape sequences and special characters work in status line gn Generic device hc This is a hard-copy terminal HC The cursor is hard to see when not on bottom line hs Has a status line hz Hazeltine bug, the terminal cannot print tilde characters in Terminal inserts nulls, not spaces, to fill white space km Terminal has a mi Cursor movement works in insert mode ms Cursor movement works in standout/underline mode NP No pad character NR ti does not reverse te nx No padding, must use XON/XOFF os Terminal can overstrike ul Terminal underlines although it cannot overstrike xb Beehive glitch, F1 sends ESCAPE, F2 sends ^C xn New line/wrap-around glitch xo Terminal uses xon/xoff protocol xs Text typed over standout text will be displayed in standout xt Teleray glitch, destructive tabs and odd standout mode

3304.DOC Page 10

Technical Bulletin

Strings with Numeric Capabilities String Effect of String co Number of columns dB Delay in milliseconds for backspace on hardcopy terminals dC Delay in milliseconds for on hardcopy terminals dF Delay in milliseconds for form feed on hardcopy terminals dN Delay in milliseconds for new line on hardcopy terminals dT Delay in milliseconds for tabulator stop on hardcopy terminals dV Delay in milliseconds for vertical tabulator stop on hardcopy terminals it Difference between tab positions lh Height of soft labels lm Lines of memory lw Width of soft labels li Number of lines Nl Number of soft labels pb Lowest baud rate that needs padding sg Standout glitch ug Underline glitch vt Virtual terminal number ws Width of status line, if different from screen width

Strings with String Capabilities String Effect of String String Effect of String !1 Shifted save key K1 upper left key on keypad !2 Shifted suspend key K2 center key on keypad !3 Shifted undo key K3 upper right key on keypad #1 Shifted help key K4 bottom left key on keypad #2 Shifted K5 bottom right key on keypad #3 Shifted input key k0 Function key 0 #4 Shifted cursor left key k1 Function key 1

3304.DOC Page 11

Technical Bulletin

%0 Redo key k2 Function key 2 %1 Help key k3 Function key 3 %2 Mark key k4 Function key 4 %3 Message key k5 Function key 5 %4 Move key k6 Function key 6 %5 Next-object key k7 Function key 7 %6 Open key k8 Function key 8 %7 Options key k9 Function key 9 %8 Previous-object key k; Function key 10 %9 Print key ka Clear all tabs key %a Shifted message key kA Insert line key %b Shifted move key kb Backspace key %c Shifted next key kB Back tab stop %d Shifted options key kC Clear screen key %e Shifted previous key kd Cursor down key %f Shifted print key kD Key for delete character under cursor %g Shifted redo key ke turn keypad off %h Shifted replace key kE Key for clear to end of line %i Shifted cusor right key kF Key for scolling forward/down %j Shifted resume key kh Cursor home key &0 Shifted cancel key kH Cursor hown down key &1 Reference key kI Insert character/Insert mode key &2 Refresh key kl Cursor left key &3 Replace key kL Key for delete line &4 Restart key kM Key for exit insert mode &5 Resume key kN Key for next page &6 Save key kP Key for previous page &7 Suspend key kr Cursor right key &8 Undo key kR Key for scolling backward/up &9 Shifted begin key ks Turn keypad on

3304.DOC Page 12

Technical Bulletin

*0 Shifted find key kS Clear to end of screen key *1 Shifted kt Clear this *2 Shifted copy key kT Set tab here key *3 Shifted create key ku Cursor up key *4 Shifted delete character l0 Label of zeroth function key, if not f0 *5 Shifted delete line l1 Label of first function key, if not f1 *6 Select key l2 Label of first function key, if not f2 *7 Shifted ...... *8 Shifted clear line key la Label of tenth function key, if not f10 *9 Shifted exit key le Cursor left one character @0 Find key ll Move cursor to lower left corner @1 Begin key LE Cursor left %1 characters @2 Cancel key LF Turn soft labels off @3 Close key LO Turn soft labels on @4 Command key mb Start blinking @5 Copy key MC Clear soft margins @6 Create key md Start bold mode @7 End key me End all mode like so, us, mb, md and mr @8 Enter/send key mh Start half bright mode @9 Exit key mk Dark mode (Characters invisible) al Insert one line ML Set left soft margin AL Insert %1 lines mm Put terminal in meta mode ac Pairs of block graphic characters to mo Put terminal out of meta mode map alternate character set ae End alternative character set mp Turn on protected attribute as Start alternative character set for mr Start reverse mode block grafic characters bc Backspace, if not ^H MR Set right soft margin bl Audio bell nd Cursor right one character bt Move to previous tab stop nw Carriage return command

3304.DOC Page 13

Technical Bulletin

cb Clear from beginning of line to pc Padding character cursor cc Dummy command character pf Turn printer off cd Clear to end of screen pk Program key %1 to send string %2 as if typed by user ce Clear to end of line pl Program key %1 to execute string %2 in local mode ch Move cursor horizontally only to pn Program soft label %1 to to show column %1 string %2 cl Clear screen and cursor home po Turn the printer on cm Cursor move to row %1 and column pO Turn the printer on for %1 (<256) %2 (on screen) bytes CM Move cursor to row %1 and column ps contents on printer %2 (in memory) cr Carriage return px Program key %1 to send string %2 to computer cs Scroll region from line %1 to %2 r1 Reset string 1 to set terminal to sane modes ct Clear tabs r2 Reset string 2 to set terminal to sane modes cv Move cursor vertically only to line r3 Reset string 3 to set terminal to sane %1 modes dc Delete one character RA disable automatic margins DC Delete %1 characters rc Restore saved cursor position dl Delete one line rf Reset string file name DL Delete %1 lines RF Request for input from terminal dm Begin delete mode RI Cursor right %1 characters do Cursor down one line rp Repeat character %1 for %2 times DO Cursor down #1 lines rP Padding after character sent in replace mode ds Disable status line rs Reset string eA Enable alternate character set RX Turn off XON/XOFF flow control ec Erase %1 characters starting at sa Set %1 %2 %3 %4 %5 %6 %7 %8 cursor %9 attributes ed End delete mode SA enable automatic margins

3304.DOC Page 14

Technical Bulletin

ei End insert mode sc Save cursor position ff Form-feed character on hardcopy se End standout mode terminals fs Return character to its position sf Normal scroll one line before going to status line F1 The string sent by function key F11 SF Normal scroll %1 lines F2 The string sent by function key F12 so Start standout mode F3 The string sent by function key F13 sr Reverse scroll ...... SR scroll back %1 lines F9 The string sent by function key F19 st Set tabulator stop in all rows at current column FA The string sent by function key F20 SX Turn on XON/XOFF flow control FB The string sent by function key F21 ta move to next hardware tab ...... tc Read in terminal description from another entry FZ The string sent by function key F45 te End program that uses cursor motion Fa The string sent by function key F46 ti Begin program that uses cursor motion Fb The string sent by function key F47 ts Move cursor to column %1 of status line ...... uc Underline character under cursor and move cursor right Fr The string sent by function key F63 ue End underlining hd Move cursor a half line down up Cursor up one line ho Cursor home UP Cursor up %1 lines hu Move cursor a half line up us Start underlining i1 Initialization string 1 at login vb Visible bell i3 Initialization string 3 at login ve Normal cursor visible is Initialization string 2 at login vi Cursor unvisible ic Insert one character vs Standout cursor IC Insert %1 characters wi Set window from line %1 to %2 and column %3 to %4 if Initialization file XF XOFF character if not ^S

3304.DOC Page 15

Technical Bulletin

im Begin insert mode ip Insert pad time and needed special characters after insert iP Initialization program

Defining Control Codes for String Capabilities There are several ways of defining the control codes for string capabilities. Normal characters, except '^', '\' and '%' represent themselves; A '^x' means Control-;. Control-A equals 1 decimal; \x means a special code, where the x can be one of the following characters: E Escape (27) n Linefeed (10) r Carriage return (13) t Tabulation (9) b Backspace (8) f Form feed (12) 0 Null character. A \xxx specifies the octal character xxx. i Increments parameters by one. r Single parameter capability + Add value of next character to this parameter and do binary output 2 Do ASCII output of this parameter with a field with of 2 d Do ASCII output of this parameter with a field with of 3 % Print a '%'

© 2004 NetManage, Inc., its subsidiaries, and its affiliates. NetManage, OnWeb, RUMBA, OneStep and the Chameleon logos are registered trademarks, registered service marks, trademarks or service marks of NetManage, Inc., its subsidiaries and its affiliates in the United States and/or other countries. IBM, AS/400, DOS, SNA, and PC are registered trademarks of International Business Machines Corporation. Novell and NetWare are registered trademarks of Novell, Inc. Microsoft, Windows and Windows NT are registered trademarks of Microsoft Corporation in the United States and/or other countries. Certain other marks are the property of their respective owners.

3304.DOC Page 16

Technical Bulletin

The information in this technical bulletin is subject to change without notice. NetManage, Inc. provides this information “as is” without warranty of any kind, either expressed or implied, but not limited to the implied warranty of merchantability and fitness for a particular purpose. NetManage, Inc. may improve or change the product at any time without further notice. This document does not represent a commitment on the part of NetManage, Inc. The software described in this document is furnished under a license agreement or nondisclosure agreement. The software may be used only in accordance with the terms of the licensing agreement.

3304.DOC Page 17