5250 Keystrokes

The sendKeys method (of the ScreenTn5250 object) sends characters and function keys to a 5250 terminal session. Function keys, such as the Transmit key, are represented with codes called mnemonics. Use the table below to identify the mnemonic that represents a particular 5250 function key.

You can send keys using either the brace style or the @ sign style.

Note The @ style mnemonics are case-sensitive. For example, @D represents Delete, whereas @d represents F13.
5250 Terminal Keystroke Function Mnemonic
(brace style)
Mnemonic
(@ style)
@ sign Enters the @ sign. n/a @@
Attention Sends an attention signal to the host.

You can use this function to disconnect from the host, send special keys, or otherwise change the session's current activity.

{ATTN} @A@Q
Backspace Moves the cursor one column to the left without deleting any characters unless the ScreenTn5250 XML parameter DestructiveBackspace is set to Delete.

If the cursor is in the first column of a line, it moves to the last column of the preceding line. If it is home, it moves to the last column of the last line of the page.

{Backspace} @<
Clear Clears the screen and moves the cursor home. {Clear} @C
Cursor down Moves the cursor down one line.

If the cursor is in the bottom line of a page, it moves to the top line.

{CursorDown} @V
Cursor left Moves the cursor one column to the left.

If the cursor is in the first column of a line, it moves to the last column of the preceding line. If it is in the first column of the first line of the page, it moves to the last column of the last line of the page.

{CursorLeft} @L
Cursor right Moves the cursor one column to the right.

If the cursor is in the last column of a line, it moves to the first column of the next line. If it is in the last column of the last line of the page, it moves to the first column of the first line of the page.

{CursorRight} @Z
Cursor select Provides light pen simulation. {CursorSelect} @A@J
Cursor up Moves the cursor up one line in the same column.

If the cursor is in the top line of a page, it moves to the bottom line.

{CursorUp} @U
Delete Deletes the character that the cursor is on and shifts the remaining characters on the line to the left. {Delete} @D
Enter Sends data to the host. {Enter} or {Transmit} @E
Erase EOF Clears all unprotected data from the cursor location to the end of the field. The cursor remains in the current position. {ClearToEndOfField} @F
Erase input Clears all the data in unprotected fields and moves the cursor to the beginning of the first unprotected field. {EraseInput} @A@F
F1-F9 Perform host-defined functions. {F1}-{F9} or
{PF1}-{PF9}
@1-@9
F10 Performs a host-defined function. {F10} or {PF10} @a
F11 Performs a host-defined function. {F11} or {PF11} @b
F12 Performs a host-defined function. {F12} or {PF12} @c
F13 Performs a host-defined function. {F13} or {PF13} @d
F14 Performs a host-defined function. {F14} or {PF14} @e
F15 Performs a host-defined function. {F15} or {PF15} @f
F16 Performs a host-defined function. {F16} or {PF16} @g
F17 Performs a host-defined function. {F17} or {PF17} @h
F18 Performs a host-defined function. {F18} or {PF18} @i
F19 Performs a host-defined function. {F19} or {PF19} @j
F20 Performs a host-defined function. {F20} or {PF20} @k
F21 Performs a host-defined function. {F21} or {PF21} @l
F22 Performs a host-defined function. {F22} or {PF22} @m
F23 Performs a host-defined function. {F23} or {PF23} @n
F24 Performs a host-defined function. {F24} or {PF24} @o
Field exit Inserts null characters from the current cursor location to the end of the field, and moves the cursor to the next unprotected field.

In a right-justified field, the data to the left of the cursor shifts to the right, and the remaining positions in the field are filled with zeros or spaces as specified by the host application.

{FieldExit} @A@E
Field minus In signed numeric and numeric-only fields, inserts null characters from the current cursor location to the end of the field, and moves the cursor to the next unprotected field.

In addition, this action inserts a minus sign (–) in the last position of a signed numeric field, or changes the last position of a numeric-only field to an alphanumeric character (this character indicates the numeric value of the last position and that it is a negative field).

Note: The behavior of this action varies, depending on the host application. Using this action in any field that cannot accept negative numbers will cause an error.

{FieldMinus} @A@–
Field plus Inserts null characters from the current cursor location to the end of the field, and moves the cursor to the next unprotected field.

In a right-justified field, the data to the left of the cursor shifts to the right, and the remaining positions are filled with zeros or spaces as specified by the host application.

{FieldPlus} @A@+
Home Moves the cursor home. {Home} @0 (zero)
Insert Toggles between overwrite mode and insert mode.

This keystroke might also insert a space at the cursor location, depending on the session configuration.

{InsertToggle} @A@I
New line Moves the cursor to first unprotected field on the next line. {NewLine} @N
Page down Scrolls the presentation space down one row. {PageDown} @v
Page up Scrolls the presentation space up one row. {PageUp} @u
Reset Unlocks the keyboard.

The keyboard might become locked if you try to enter data while the cursor is in a protected field, and in other circumstances. The status line indicates that the keyboard is locked by displaying an x plus one of several other symbols.

{Reset} @R
System request Sends a system request message to the host. {SystemRequest} @A@H
Tab Moves the cursor to the next tab stop.

If tab stops were not set, this keystroke moves the cursor home.

In forms mode, this keystroke moves the cursor to the next unprotected field.

{Tab} @T
Tab back Moves the cursor to the previous tab stop.

If tabs were not set, this keystroke moves the cursor home.

In forms mode, this keystroke moves the cursor to the previous unprotected field.

{Backtab} @B
Test request Enters the Test Request function from the AS/400 sign-on screen. {TestRequest} @A@C
Related Topics
Troubleshooting
Keystroke Reference
Legacy API Support
  Footer