S3270 how to send a function key (iE PF3)

488 views Asked by At

If i wanted to write like "hello" at position row 20 col 4

I would do it like that:

MoveCursor(20,4)
Key(h)
Key(e)
Key(l)
Key(l)
Key(o)
Enter [if i wanted to submit it. "Enter" also works]

works fine. But how do i send a function key? I tried "Key(pf3)", "Key(Pf3)" etc But it appears "Key()" simply isn't the correct action and i have trouble finding the correct one.

Derived from how it works with "Enter" i also tried just "Pf3" with no success.

1

There are 1 answers

0
Hogstrom On BEST ANSWER

PF keys like PFn, PA1, Attn generate an attention and are identified by the Attention IDentifier (AID). To send PF keys you would execute:

PF(n) where n is the PF Key number you want to send.

Conceptually, all keystrokes are handled by the terminal to update the screen buffer. When you want to send something to the host only specific keys generate that action.

So, letters, numbers, ... are local keystrokes

Keys like PFnn, PAn Attn Send the current buffer with an Attention Identifer AID that tells the host what “command” key was sent.

In this documentation script commands with an asterisk send data to the host. The other keys simply update the local screen buffer. (Pulled examples, see the doc for the full list)

*Enter Enter AID (or send ASCII CR)

Erase erase previous character (or send ASCII BS)

EraseEOF erase to end of current field EraseInput erase all input fields

Execute(cmd) execute a command in a shell

FieldEnd move cursor to end of field

FieldMark mark field

*Interrupt send TELNET IP to host

Key(keysym) insert key keysym Key(0xxx) insert key with character code xx

Left move cursor left

*PA(n) Program Attention AID (n from 1 to 3)

*PF(n) Program Function AID (n from 1 to 24)