What Ctrl does in a 5250 emulator, and why IBM i never sees a Ctrl key
A 5250 keyboard sends fields and an attention key, not Ctrl characters. In an emulator Ctrl is a local key: Enter or Reset on its own, or part of a shortcut.
If you come to IBM i from a Unix shell, you may look for a way to "send Ctrl" to the host, for example Ctrl+C to stop something. On a 5250 screen there is no such thing to send.
Why there is no Ctrl on a 5250 screen
A 5250 display works in block mode. You fill in fields, then press a key such as Enter or F3. The emulator then sends that key, the cursor position and the changed fields to IBM i. See How a 5250 terminal works and 5250 function keys.
So a Ctrl combination is never sent to IBM i as a character. It can only be something the emulator does on your side.
What emulators do with Ctrl
Each emulator chooses. IBM Host On-Demand's default keyboard map is a published example:
- Ctrl on its own is mapped to the function Enter or Reset.
- Ctrl+Enter is Field Exit.
- Ctrl+Delete is Delete Word, and Ctrl+Home is Rule.
- Ctrl+C, Ctrl+V and Ctrl+X are copy, paste and cut, and Ctrl+P prints the screen.
The same page notes that in VT sessions, Ctrl key values are sent to the host instead, which is why the menu shortcuts are removed there.
Other emulators use different keys. Look in the emulator's keyboard settings for the functions you need. In IBM i Access Client Solutions this is Edit > Preferences > Keyboard, category Host Functions.
In this app's 5250 sessions, Ctrl+Return is Field Exit, and Ctrl on its own is not mapped to Enter or Reset; see Keyboard shortcuts.
To stop or interrupt something on IBM i
Use the 5250 keys for it, not Ctrl+C:
- Attn (attention) interrupts the program you are running, or opens the attention-key menu if the system has one.
- SysReq (system request) shows a line at the bottom of the screen; press Enter on it to open the System Request menu, which has an option to end the request.
Both are described in 5250 function keys ("Attention and system request").
In an SSH session to the IBM i shell (PASE), the keys are VT keys again, and Ctrl+C sends a control character to the shell like on other Unix hosts. See Keys and key codes.
Related
- 5250 function keys
- Field Exit, Field+ and Field-
- How a 5250 terminal works
- App guide: Keyboard shortcuts