1

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.

  • https://stackoverflow.com/questions/4433099/how-to-send-f1-key-to-3270-terminal-emulator-using-microsoft-his?rq=1 Is similiar in a sense that he wants the same thing as i in an abstraction layer above. But i couldn't find a way to transfer his solution to my problem. My Cursor is set. @3 does not translate to Pf3 for me. – Daniel Wallenborn Jan 10 '20 at 11:00
  • What software are you using for emulation? – zarchasmpgmr Jan 11 '20 at 20:52
  • The name is s3270 it's in the title and i tried to add it as a tag but i wasn't allowed to add new tags. If you just google s3270 it yields useful results. The official manual for example is the first result for me. (Where i somehow missed the answer to my question.) I could add an explicit statement, but it feels rather redundant to me as the name is in the title. Correct me if i am wrong, but putting the name of the used program in the title seems to be an implicit convention. Admittedly i should have probably put it in brackets[]. I think i will do that.Edit: Not allowed to do that. – Daniel Wallenborn Jan 17 '20 at 10:17
  • My apologies, the uppercase S threw me. – zarchasmpgmr Jan 17 '20 at 23:41

1 Answers1

2

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)

Community
  • 1
  • 1
Hogstrom
  • 3,581
  • 2
  • 9
  • 25