USER GUIDE
Version 3.0
Another solution is to give the ip and port address in the HTML file loading the telnet applet.
<HTML> <HEAD> <TITLE> Mocha Telnet example </TITLE> </HEAD> <BODY> <APPLET CODE="telnet.class" ARCHIVE="telnet.jar" WIDTH="800" HEIGHT="500" scriptable="true"> <param name="host" value="unix"> <param name="port" value="23"> <param name="ssh3" value="false"> <param name="autoconnect" value="true"> <param name="script1" value="ogin=joe"> <param name="script2" value="ssword=12345678"> <param name="user_ssh" value="joe"> <param name="password_ssh" value="1234"> <param name="license" value="jan"> <param name="license_key" value=""> <param name="font" value="Courier"> <param name="keylayout" value="default"> <param name="fontstyle" value="Plain"> <param name="termtype" value="vt220"> <param name="margin" value="36"> <param name="response" value="MOCHASOFT TELNET"> <param name="tool_bar" value="true"> <param name="menu_bar" value="true"> <param name="show_fxx" value="true"> <param name="negotiate" value="false"> <param name="debug" value="false"> <param name="local_echo" value="false"> <param name="scroll_wheel" value="true"> <param name="scroll_bar" value="false"> <param name="color_bg" value="#D3D3D3"> <param name="color_fg" value="#1010FF"> <param name="color_bold" value="#FF0000"> <param name="color_cursor" value="#FFFFFF"> <param name="new_line" value="false"> <param name="keepalive" value="true"> </applet> </body> </html>CODE parameter must always be "telnet.class". It is the name of the master file for the binary Mocha Telnet product. To use the full width use "100%"
Each parameter
is build of a name and a value. In the example above parameter host is
given value unix.
It is very important to remember <> around each line, and the value must
be surrounded with "".
As to give keyboard focus to the applet when loaded add a small script:
<script type="text/javascript"> onload = function() { document.getElementsByTagName( "APPLET" )[0].focus(); } </script>
Syntax:
name=keylayout value="<a file name>"
Syntax:
name=license value="<name of a company>"
Syntax:
name=license_key value="<encrypted key>"
Syntax:
name=script1 value="<text to find>=<text to answer with>
name=script2 value="<text to find>=<text to answer with>
Example:
name=script1 value="Login=guest"
name=script2 value="Password=funny"
Syntax:
name=user_ssh value=<userid>
name=password_ssh value=<password>
Example:
name=user_ssh value="joe"
name=password_ssh value="password"
Syntax:
name=negotiate value="true | false"
Default is false.
Syntax:
name=local_echo value="true | false"
Default is false.
Syntax:
name=new_line value="true | false"
Default is false, which means only <cr>.
Syntax:
name=tool_bar value="true | false"
Default is true.
Syntax:
name=scroll_bar value="true | false"
Default is true.
Syntax:
name=show_fxx value="true | false"
Default is true.
Syntax:
name=color_bg value="#rrggbb"
where
Syntax:
name=color_fg value="#rrggbb"
where
Syntax:
name=color_bold value="#rrggbb"
where
Syntax:
name=color_cursor value="#rrggbb"
where
Syntax:
name=host value=<a host name>
name=port value=<number>
The host name can either be a name or an internet
address as 198.66.23.11. There is not a real server at this address!
Syntax:
name=SSH value="true | false"
Default is false
Syntax:
name=autoconnect value="true | false"
Default is false
Syntax:
name=termtype value=<type of terminal emulation>
Default is vt220
Syntax:
name=response value="ID text"
Default is MOCHASOFT_TELNET
Syntax:
name=font value="font name"
name=fontstyle value="style"
Default is Courier. To see the font names possible to use, start mocha telnet in a browser, and select menu - settings - font.
Possible font styles are :Plain,Bold, Italic and Bold Italic.
Syntax:
name=keepalive= value="true | false"
Default is true.
Syntax:
name=margin value="36"
Default is 36
Syntax:
name=scroll_wheel value="true | false"
Default is true
The package includes an example keyboard file keys, which can be used with parameter "keylayout".
name=keylayout value="keys"
Syntax for file "keys":
Example of a "keys" file:
# VT220 keymap file # \033 = ESC UP \033[A DOWN \033[B RIGHT \033[C LEFT \033[D f1 \033[11~ f2 \033[12~ f3 \033[13~ # a comment ....remark none ASCII characters are written in octal as \xxx , where xxx is the octal value.
The comments (#) at end of the lines are not used by Mocha Telnet.
Key mapping Key mapping ----------------------- ---------------------------- f1 f1 crtl f1 f1 f2 f2 ctrl f2 f2 f3 f3 ctrl f3 f3 f4 f4 ctrl f4 f4 f5 f5 ctrl f5 f5 f6 f6 ctrl f6 f6 f7 f7 ctrl f7 f7 f8 f8 ctrl f8 f8 f9 f9 ctrl f9 f9 f10 f10 ctrl f10 f10 f11 f11 ctrl f11 - f12 f12 ctrl f12 - Key mapping Key mapping ----------------------- ---------------------------- shift f1 f11 crtl shift f1 f11 shift f2 f12 ctrl shift f2 f12 shift f3 f13 ctrl shift f3 f13 shift f4 f14 ctrl shift f4 f14 shift f5 f15 ctrl shift f5 f15 shift f6 f16 ctrl shift f6 f16 shift f7 f17 ctrl shift f7 f17 shift f8 f18 ctrl shift f8 f18 shift f9 f19 ctrl shift f9 f19 shift f10 f20 ctrl shift f10 f20 shift f11 - ctrl shift f11 - shift f12 - ctrl shift f12 -
Part of the auxiliary keypad can be used as:
Editing Keys:
key codes -------------- HOME CSI 1 ~ END CSI 2 ~ PGUP CSI 5 ~ PGDN CSI 6 ~ BACKSPACE \010 # some UNIX servers uses \177Cursor Control Keys:
key normal application vt52 --------------------------------------- UP CSI A SS3 A ESC A DOWN CSI B SS3 B ESC B RIGHT CSI C SS3 C ESC C LEFT CSI D SS3 D ESC D
Function Keys
key codes ------------------------- F1 \033OP F2 \033OQ F3 \033OR F4 \033OS F5 \033[15~ F6 \033[17~ F7 \033[18~ F8 \033[19~ F9 \033[20~ F10 \033[21~ F11 \033[23~ F12 \033[24~ F13 \033[25~ F14 \033[26~ F15 \033[28~ F16 \033[29~ F17 \033[31~ F18 \033[32~ F19 \033[33~ F20 \033[34~
SS3 = \217 CSI = \233 (or ESC [)
If parameter "license_key" is not given, the program will run in Demo mode, and a session is restricted to 180 seconds