Note: This section applies to MCP T27 and OS 2200 UTS applications only.
Sometimes finer control of the data input to the host application is required. The client message created for T27 and UTS data source projects contains a member, of type String, called _KeySequence.
When the client message is submitted to the ePortal runtime, _KeySequence is interpreted as keyboard input. _KeySequence is interpreted last, after the other members of the client message.
_KeySequence may contain any printable character, selected T27 control sequences, or Unisys defined special functions enclosed in angle brackets.
For T27, if _KeySequence is not the empty String, <TRANSMIT> or <SPECIFY> must appear in the string, or no data is sent to the MCP Server.
For UTS, if _KeySequence is not the empty String, <TRANSMIT> or a Function key must appear in the string, or no data is sent to the OS 2200 Server.
Like any other field in a client message, there are a number of ways to set the _KeySequence field before the message is submitted to ePortal, such as:
Set the field InitialValue using the message editor. Refer to the topics Message Editor and Key Sequence Editor Dialog for more information.
Set the field in orchestration. Refer to the topics Understanding Orchestration, Assign Data for Message Dialog Box, and Key Sequence Editor Dialog for more information.
Set the field in the code-behind file for a Web Forms project or mobile presentation project. Refer to the topic Programming in the Code-Behind File for more information.
The tables below describe the Unisys-defined special functions:
Common Functions
Function | Description |
---|---|
<CLEAREOL> | Clears unprotected data from cursor to end of line or field. |
<CLEAREOP> | Clears unprotected data from cursor to the end of the page. |
<CLEARHOME> | Moves the cursor to home and clears unprotected data. |
<CURSORDOWN> | Moves cursor down one line with wrap. |
<CURSORLEFT> | Moves cursor left one character with wrap. |
<CURSORRIGHT> | Moves cursor right one character with wrap. |
<CURSORUP> | Moves cursor up one line with wrap. |
<DELETECHAR> | Deletes a character at cursor position, subject to forms mode restrictions. |
<DELETELINE> | Deletes the line at cursor position (forms must be disabled). |
<HOME> | Moves the cursor to the home position. |
<INSERTLINE> | Inserts blank line at cursor position (forms must be disabled). |
<TAB> | Moves cursor to next unprotected field with page wrap. |
<TRANSMIT> | Transmits the page when forms are enabled, or transmits from home to the cursor position when forms are disabled. |
<REVERSETAB> | Moves cursor to previous unprotected field with page wrap. |
T27-Only Functions
<ALIGN> | Aligns the Keyboard cursor to the Datacom pointer. |
<CONTROL> | Initiates a control sequence (see Supported T27 Control Sequences below). |
<DISABLEFORMS> | Disables forms mode on the page. |
<ENABLEFORMS> | Enables forms mode on the page. |
<ETX> | Places an ETX character on the screen. |
<GS> | Places a GS character on the screen. |
<NEXTPAGE> | Puts input focus on next page. |
<PREVPAGE> | Puts input focus on previous page. |
<SPECIFY> | Uses the current cursor position. |
UTS-Only Functions
<SOE> | Start of Entry Character |
<F1> | Function Key F1 |
<F2> | Function Key F2 |
<F3> | Function Key F3 |
<F4> | Function Key F4 |
<F5> | Function Key F5 |
<F6> | Function Key F6 |
<F7> | Function Key F7 |
<F8> | Function Key F8 |
<F9> | Function Key F9 |
<F10> | Function Key F10 |
<F11> | Function Key F11 |
<F12> | Function Key F12 |
<F13> | Function Key F13 |
<F14> | Function Key F14 |
<F15> | Function Key F15 |
<F16> | Function Key F16 |
<F17> | Function Key F17 |
<F18> | Function Key F18 |
<F19> | Function Key F19 |
<F20> | Function Key F20 |
<F21> | Function Key F21 |
<F22> | Function Key F22 |
Supported T27 Control Sequences
Sequence | Description |
---|---|
H c | Type character that is hexadecimal 20 less than character c. |
nn<TRANSMIT> | Numerical control message. |
< COL ROW | Programmable cursor. |
> | Aligns the Keyboard cursor to the Datacom pointer. |
B | Move line down. |
K n | Set Asian highlight. |
L n | Reset Asian highlight. |
M | Roll page down. |
N | Roll page up. |
Q | Disable forms mode. |
T | Enable lower case. |
V | Move line up. |
W | Enable forms mode. |
Y | Disable lower case. |
Notes:
n is any number between 0 and 9 inclusive.
c is any printable character.
COL and ROW are column and row positions. A position is denoted by consecutive characters in the ASCII collating sequence, starting with the space character, which represents 1. The next character in the ASCII collating sequence is the exclamation point (!), which represents 2, and so on.
T27 Keystroke example
This example adds a button to MyPage.aspx, that sets a protected input field, located at column 10, row 5 on the T27 screen, to "ABC" and transmits the page to the MCP Server.
To implement this example, do the following:
In the MyPage.aspx design view, place a button control on the page by dragging it from the toolbox.
Under the button's properties view, in the event section, double click on the click property.
This opens the file MyPage.aspx.cs, and adds the Button1_Click method.
In this method, add the code as follows:
Protected void Button1_Click(object sender, EventArgs e) { Logon_obj._KeySequence = "<DISABLEFORMS><CONTROL><)$ABC<ENABLEFORMS><TRANSMIT>"; ePortalSubmit(sender, e); }
Notes:
The character ) is used to denote 10 since it is the 9th character after space in the ASCII collating sequence.
The character $ is used to denote 5 since it is the 4th character after space in the ASCII collating sequence.
A call to either ePortalSubmit or Unisys.WebSupport.Submit is required to send the pageName_obj to the connector for processing. The ePortalSubmit method sets the pageName_obj members to values set in the page's controls. Converserly, a call directly to Unisys.WebSupport.Submit will not update the pageName_obj before submitting.
OS 2200 Keystroke example
This example adds a button to MyPage.aspx, that transmits the page with the F5 function key.
To implement this example, do the following:
In the MyPage.aspx design view, place a button control on the page by dragging it from the toolbox.
Under the button's properties view, in the event section, double click on the click property.
This opens the file MyPage.aspx.cs, and adds the Button1_Click method.
In this method, add the code as follows:
Protected void Button1_Click(object sender, EventArgs e) Logon_obj._KeySequence ="<F5>"; ePortalSubmit(sender, e);
Note: A call to either ePortalSubmit or Unisys.WebSupport.Submit is required to send the pageName_obj to the connector for processing. The ePortalSubmit method sets the pageName_obj members to values set in the page's controls. Converserly, a call directly to Unisys.WebSupport.Submit will not update the pageName_obj before submitting.