1x3270(1) General Commands Manual x3270(1)
2
3
4
6 x3270 - IBM host access tool
7
9 x3270 [options] [host]
10 x3270 [options] session-file.x3270
11
13 x3270 opens a telnet connection to an IBM host in an X window. It
14 implements RFCs 2355 (TN3270E), 1576 (TN3270) and 1646 (LU name selec‐
15 tion), and supports IND$FILE file transfer. The window created by
16 x3270 can use its own font for displaying characters, so it is a fairly
17 accurate representation of an IBM 3278 or 3279. It is similar to
18 tn3270(1) except that it is X11-based, not curses-based. The full syn‐
19 tax for host is:
20 [prefix:]...[LUname@]hostname[:port][=accept]
21
22 Prepending a P: onto hostname causes the connection to go through the
23 telnet-passthru service rather than directly to the host. See PASSTHRU
24 below.
25
26 Prepending an S: onto hostname removes the "extended data stream"
27 option reported to the host. See -tn below for further information.
28
29 Prepending an N: onto hostname turns off TN3270E support for the ses‐
30 sion.
31
32 Prepending an L: onto hostname causes x3270 to first create a TLS tun‐
33 nel to the host, and then create a TN3270 session inside the tunnel.
34 (This function is supported only if x3270 was built with TLS support).
35 Note that TLS-encrypted sessions using the TELNET START-TLS option are
36 negotiated with the host automatically; for these sessions the L: pre‐
37 fix should not be used.
38
39 Prepending a Y: onto hostname causes x3270 to skip validation of host
40 TLS certificates. This overrides any other configuration or command-
41 line options.
42
43 Prepending an A: onto hostname is equivalent to setting the -nvt
44 option; it forces an NVT-mode session instead of a 3270-mode session.
45
46 A specific Logical Unit (LU) name to use may be specified by prepending
47 it to the hostname with an `@'. Multiple LU names to try can be sepa‐
48 rated by commas. An empty LU can be placed in the list with an extra
49 comma. (Note that the LU name is used for different purposes by dif‐
50 ferent kinds of hosts. For example, CICS uses the LU name as the Ter‐
51 minal ID.)
52
53 The hostname may optionally be placed inside square-bracket characters
54 `[' and `]'. This will prevent any colon `:' characters in the host‐
55 name from being interpreted as indicating option prefixes or port num‐
56 bers. This allows numeric IPv6 addresses to be used as hostnames.
57
58 On systems that support the forkpty library call, the hostname may be
59 replaced with -e and a command string. This will cause x3270 to con‐
60 nect to a local child process, such as a shell.
61
62 The port to connect to defaults to telnet. This can be overridden with
63 the -port option, or by appending a port to the hostname with a colon
64 `:'. (For compatability with previous versions of x3270 and with
65 tn3270(1), the port may also be specified as a second, separate argu‐
66 ment.)
67
68 An optional accept name (a hostname to accept in the host's TLS cer‐
69 tificate) may be specified by appending it to the hostname with an
70 equals sign (`='). The accept name can also be specified with the
71 -accepthostname option.
72
73
75 x3270 is a toolkit based program, so it understands standard Xt options
76 and resources. It also understands the following options:
77
78 -accepthostname name
79 Specifies a particular hostname to accept when validating the
80 name presented in the server SSL certificate, instead of compar‐
81 ing to the name used to make the connection.
82
83 -activeicon
84 Specifies that the icon should be a miniature version of the
85 screen image. See ICONS below.
86
87 -apl Sets up APL mode. This is actually an abbreviation for several
88 options. See APL SUPPORT below.
89
90 -cadir directory
91 Specifies a directory containing CA (root) certificates to use
92 when verifying a certificate provided by the host. (OpenSSL
93 only)
94
95 -cafile filename
96 Specifies a PEM-format file containing CA (root) certificates to
97 use when verifying a certificate provided by the host. (OpenSSL
98 only)
99
100 -cc range:value[,...]
101 Sets character classes.
102
103 -certfile filename
104 Specifies a file containing a client certificate to provide to
105 the host. The default file type is PEM.
106
107 -clientcert name
108 Specifies the name of a client certificate to provide to the
109 host. (MacOS only)
110
111 -certfiletype type
112 Specifies the type of the certificate file specified by -cert‐
113 file. Type can be pem or asn1. (OpenSSL only)
114
115 -chainfile filename
116 Specifies a certificate chain file in PEM format, containing a
117 certificate to provide to the host, as well as one or more
118 intermediate certificates and the CA certificate used to sign
119 that certificate. If -chainfile is specified, it overrides
120 -certfile. (OpenSSL only)
121
122 -clear toggle
123 Sets the initial value of toggle to false.
124
125 -codepage name
126 Specifies an EBCDIC host code page.
127
128 -connecttimeout seconds
129 Specifies the time that x3270 will wait for a host connection to
130 complete.
131
132 -devname name
133 Specifies a device name (workstation ID) for RFC 4777 support.
134
135 -efont name
136 Specifies a font for the emulator window.
137
138 -hostsfile file
139 Uses file as the hosts file, which allows aliases for host names
140 and scripts to be executed at login. See ibm_hosts(1) for
141 details.
142
143 -httpd [addr:]port
144 Specifies a port and optional address to listen on for HTTP con‐
145 nections. Addr can be specified as `*' to indicate 0.0.0.0; the
146 default is 127.0.0.1. IPv6 numeric addresses must be specified
147 inside of square brackets, e.g., [::1]:4080 to specify the IPv6
148 loopback address and TCP port 4080.
149
150 Note that this option is mutually-exclusive with the -scriptport
151 option
152
153 -iconname name
154 Specifies an alternate title for the program icon.
155
156 -iconx x
157 Specifies the initial x coordinate for the program icon.
158
159 -icony y
160 Specifies the initial y coordinate for the program icon.
161
162 -im method
163 Specifies the name of the input method to use for multi-byte
164 input. (Supported only when x3270 is compiled with DBCS sup‐
165 port.)
166
167 -keyfile filename
168 Specifies a file containing the private key for the certificate
169 file (specified via -certfile or -chainfile). The default file
170 type is PEM. (OpenSSL only)
171
172 -keyfiletype type
173 Specifies the type of the private key file specified by -key‐
174 file. Type can be pem or asn1. (OpenSSL only)
175
176 -keypasswd type:value
177 Specifies the password for the private key file (OpenSSL) or
178 client certificate file (MacOS), if it is encrypted. The argu‐
179 ment can be file:filename, specifying that the password is in a
180 file, or string:string, specifying the password on the command-
181 line directly. If the private key file is encrypted and no
182 -keypasswd option is given, the password will be prompted for
183 interactively.
184
185 -keymap name
186 Specifies a keymap name and optional modifiers. See KEYMAPS
187 below.
188
189 -keypad
190 Turns on the keypad as soon as x3270 starts.
191
192 -km name
193 Specifies the local encoding method for multi-byte text. name
194 is an encoding name recognized by the ICU library. (Supported
195 only when x3270 is compiled with DBCS support, and necessary
196 only when x3270 cannot figure it out from the locale.)
197
198 -loginmacro Action(arg...) ...
199 Specifies a macro to run at login time.
200
201 -model name
202 The model of 3270 display to be emulated. The model name is in
203 two parts, either of which may be omitted:
204
205 The first part is the base model, which is either 3278 or 3279.
206 3278 specifies a monochrome (green on black) 3270 display; 3279
207 specifies a color 3270 display.
208
209 The second part is the model number, which specifies the number
210 of rows and columns. Model 4 is the default.
211
212 Model Number Columns Rows
213 ──────────────────────────────
214 2 80 24
215 3 80 32
216 4 80 43
217 5 132 27
218
219 Note: Technically, there is no such 3270 display as a 3279-4 or
220 3279-5, but most hosts seem to work with them anyway.
221
222 The default model for a color X display is 3279-4. For a
223 monochrome X display, it is 3278-4.
224
225 -mono Forces x3270 to believe it is running on a monochrome X display.
226
227 -noverifycert
228 For TLS connections, do not verify the host certificate.
229
230 -nvt Start in NVT mode instead of waiting for the host to send data,
231 and make the default terminal type xterm.
232
233 -once Causes x3270 to exit after a host disconnects. This option has
234 effect only if a hostname is specified on the command line.
235
236 -oversize colsxrows
237 Makes the screen larger than the default for the chosen model
238 number. This option has effect only in combination with
239 extended data stream support (controlled by the "x3270.extended"
240 resource), and only if the host supports the Query Reply
241 structured field. The number of columns multiplied by the
242 number of rows must not exceed 16383 (3fff hex), the limit of
243 14-bit 3270 buffer addressing.
244
245 -port n
246 Specifies a different TCP port to connect to. n can be a name
247 from /etc/services like telnet, or a number. This option
248 changes the default port number used for all connections. (The
249 positional parameter affects only the initial connection.)
250
251 -printerlu luname
252 Causes x3270 to automatically start a pr3287 printer session.
253 If luname is ".", then the printer session will be associated
254 with the interactive terminal session (this requires that the
255 host support TN3270E). Otherwise, the value is used as the
256 explicit LU name to associate with the printer session.
257
258 -proxy type:host[:port]
259 Causes x3270 to connect via the specified proxy, instead of
260 using a direct connection. The host can be an IP address or
261 hostname. The optional port can be a number or a service name.
262 For a list of supported proxy types, see PROXY below.
263
264 -pt type
265 Specifies the preedit type for the multi-byte input method.
266 Valid values are OverTheSpot, OffTheSpot, Root and OnTheSpot.
267 The value for OverTheSpot can include an optional suffix, a
268 signed number indicating the vertical distance in rows of the
269 preedit window from the cursor position, e.g. OverTheSpot+1 or
270 OverTheSpot-2. The default value is OverTheSpot+1. (Supported
271 only when x3270 is compiled with DBCS support.)
272
273 -reconnect
274 Causes x3270 to automatically reconnect to the host if it ever
275 disconnects. This option has effect only if a hostname is
276 specified on the command line.
277
278 -sb Turns on the scrollbar.
279
280 +sb Turns the scrollbar off.
281
282 -scheme name
283 Specifes a color scheme to use in 3279 mode. This option has
284 effect only in combination with 3279 emulation.
285
286 -script
287 Causes x3270 to read actions from standard input, with the
288 results written to standard output. The protocol for these
289 actions is documented in x3270-script(1).
290
291 -sl n Specifies that n lines should be saved for scrolling back. The
292 default is 4096.
293
294 -scriptport [addr:]port
295 Specifies a port and optional address to listen on for scripting
296 connections. Addr can be specified as `*' to indicate 0.0.0.0;
297 the default is 127.0.0.1. IPv6 numeric addresses must be
298 specified inside of square brackets, e.g., [::1]:4081 to specify
299 the IPv6 loopback address and TCP port 4081.
300
301 Note that this option is mutually-exclusive with the -httpd
302 option
303
304 -scriptportonce
305 Allows x3270 to accept only one script connection. When that
306 connection is broken, x3270 will exit.
307
308 -secure
309 Disables run-time features that could compromise system security
310 (user-specified file names and actions, etc.).
311
312 -set toggle
313 Sets the initial value of toggle to true.
314
315 -socket
316 Causes the emulator to create a Unix-domain socket when it
317 starts, for use by script processes to send actions to the
318 emulator. The socket is named /tmp/x3sck.pid. The -p option of
319 x3270if causes it to use this socket, instead of pipes specified
320 by environment variables.
321
322 -tn name
323 Specifies the terminal name to be transmitted over the telnet
324 connection. The default name is IBM-model_name-E, for example,
325 IBM-3279-4-E for a color X display, or IBM-3278-4-E for a
326 monochrome X display.
327
328 Some hosts are confused by the -E suffix on the terminal name,
329 and will ignore the extra screen area on models 3, 4 and 5.
330 Prepending an S: on the hostname, or setting the
331 "x3270.extended" resource to "false", removes the -E from the
332 terminal name when connecting to such hosts.
333
334 The name can also be specified with the "x3270.termName"
335 resource.
336
337 -trace Turns on data stream tracing at startup. Unlike turning it on
338 from a menu option, there is no pop-up to confirm the file name,
339 which defaults to /tmp/x3trc.pid.
340
341 -tracefile file
342 Specifies a file to save data stream and event traces into. If
343 the name starts with `>>', data will be appended to the file.
344 If the value stdout is given, then traces will be written to
345 standard output. If the value none is given, then traces will
346 be piped directly to the monitor window, and no file will be
347 created.
348
349 -tracefilesize size
350 Places a limit on the size of a trace file. If this option is
351 not specified, or is specified as 0 or none, the trace file size
352 will be unlimited. The minimum size is 64 Kbytes. The value of
353 size can have a K or M suffix, indicating kilobytes or megabytes
354 respectively. When the trace file reaches the size limit, it
355 will be renamed with a `-' appended and a new file started.
356
357 -user name
358 Specifies the user name for RFC 4777 support.
359
360 -v Display the version and build options for x3270 and exit.
361
362 -verifycert
363 For TLS connections, verify the host certificate, and do not
364 allow the connection to complete unless it can be validated.
365 (This is the default setting.) This option is overridden by a
366 Y: prepended to the hostname when connecting.
367
368 After reading resource definitions from the X server and any
369 standandard X11 resource definition files ($HOME/.Xdefaults, etc.),
370 x3270 will read definitions from the file $HOME/.x3270pro. This file
371 contains local customizations and is also used to save changed options
372 by the Save Changed Options in File menu option.
373
374 Note that -xrm options override any definitions in the .x3270pro file.
375
377 The x3270 status line contains a variety of information. From left to
378 right, the fields are:
379
380 comm status
381 The first symbol is always a 4. If x3270 is in TN3270E mode,
382 the second symbol is a B; otherwise it is an A. If x3270 is
383 disconnected, the third symbol is a question mark. Otherwise,
384 if x3270 is in SSCP-LU mode, the third symbol is an S.
385 Otherwise it is blank.
386
387 keyboard lock
388 If the keyboard is locked, an "X" symbol and a message field
389 indicate the reason for the keyboard lock.
390
391 shift Three characters indicate the keyboard modifier status. "M"
392 indicates the Meta key, "A" the Alt key, and an up-arrow or "^"
393 indicates the Shift key.
394
395 compose
396 The letter "C" indicates that a composite character is in
397 progress. If another symbol follows the "C", it is the first
398 character of the composite.
399
400 typeahead
401 The letter "T" indicates that one or more keystrokes are in the
402 typeahead buffer.
403
404 temporary keymap
405 The letter "K" indicates that a temporary keymap is in effect.
406
407 reverse
408 The letter "R" indicates that the keyboard is in reverse field
409 entry mode.
410
411 insert mode
412 A thick caret "^" or the letter "I" indicates that the keyboard
413 is in insert mode.
414
415 printer session
416 The letter "P" indicates that a pr3287 session is active.
417
418 script The letter "S" indicates that a script is active.
419
420 LU name
421 The LU name associated with the session, if there is one.
422
423 timing A clock symbol and a time in seconds indicate the time it took
424 to process the last AID or the time to connect to a host. This
425 display is optional.
426
427 cursor position
428 The cursor row and column are optionally displayed, zero padded
429 and separated by a "/". Location 001/001 is at the upper left,
430 which is different from the row and columns parameters used with
431 various actions, where the upper left corner is row 0, column 0.
432
434 If the -activeicon option is given (or the "x3270.activeIcon" resource
435 is set to true), x3270 will attempt to make its icon a miniature
436 version of the current screen image. This function is highly dependent
437 on your window manager:
438
439 mwm The size of the icon is limited by the "Mwm.iconImageMaximum"
440 resource, which defaults to 50x50. The image will be clipped at
441 the bottom and right. The icon cannot accept keyboard input.
442
443 olwm The full screen image of all 3270 models can be displayed on the
444 icon. However, the icon cannot be resized, so if the model is
445 later changed with an x3270 menu option, the icon image will be
446 corrupted. The icon cannot accept keyboard input.
447
448 twm and tvtwm
449 The full screen image of all 3270 models can be displayed on the
450 icon, and the icon can be resized. The icon can accept keyboard
451 input.
452
453 However, twm does not put labels on application-supplied icon
454 windows. You can have x3270 add its own label to the icon by
455 setting the "x3270.labelIcon" resource to true. The default
456 font for icon labels is 8x13; you may change it with the
457 "x3270.iconLabelFont" resource.
458
460 The type of keyboard may be specified with the -keymap switch or using
461 either the KEYMAP or KEYBD environment variables. The types of
462 supported keyboards include sun_k3, sun_k4, sun_k5, hp-k1, hp-pc and
463 ncd.
464
465 The keymap may also be specified as a comma-separated list of names.
466 Later definitions override earlier ones. This is used to specify both
467 a primary keyboard type and a set of modifiers. The modifiers defined
468 include:
469
470 ow (OpenWindows) Swaps the middle and right mouse button
471 definitions, so the middle button performs the "Extend" function
472 and the right-hand button performs the "Paste" function. Also
473 changes the cut and paste actions to use the OpenWindows
474 CLIPBOARD.
475
476 apl Allows entry of APL characters (see APL SUPPORT below).
477
478 finnish7
479 Replaces the bracket, brace and bar keys with common Finnish
480 characters.
481
482 norwegian7
483 Replaces the bracket, brace and bar keys with common Norwegian
484 characters.
485
486 A temporary keymap can also be specified while x3270 is running with
487 the Keymap action. When the action Keymap(n) is executed, temporary
488 keymap n is added to or deleted from the current keymap. Multiple
489 temporary keymaps can be active simultaneously. The action
490 Keymap(None) restores the original keymap. Note: When Keymap() is
491 specified as part of a list of multiple actions in a keymap, it must be
492 the last action in the list.
493
494 The temporary keymap hebrew is provided to allow entry of Hebrew
495 characters.
496
497 The X Toolkit translation mechanism is used to provide keyboard
498 emulation. It maps events into actions. The best documentation can be
499 found with X toolkit documents, but the following should suffice for
500 simple customization.
501
502 An Xt event consists of (at least) four fields. The first is called a
503 modifier. It may be any combination of Meta, Shift and Ctrl. If it is
504 prefaced by !, it means those modifiers only. The second field is the
505 specific event, in x3270 usually just <Key>. The third field is the
506 detail field, which gives the actual key. The name of the key may be
507 determined using the xev program or with the "Trace X Events" menu
508 option. The last field is the action, which is the internal emulator
509 function. A complete list of actions may be found later in the manual.
510
511 There are three levels of translation tables in x3270. The first is a
512 defined by the resource x3270.keymap.base. It defines alphabetic,
513 numeric, function keys, and such basic functions as Enter and Delete.
514 It allows a minimal useful functionality. It is generally compiled in
515 x3270, but can be overridden.
516
517 The second level is a keyboard specific table, which is selected by the
518 x3270.keymap resource, and defined by the x3270.keymap.name resource
519 (where name is the value of the x3270.keymap resource). This keymap
520 defines actions for such things as keypad keys, and keys unique to
521 certain keyboards. Several predefined keymaps are included with x3270.
522
523 The third level is a user customizable table which may be used to
524 augment or override key definitions. This keymap is defined by the
525 x3270.keymap.name.user resource.
526
527 In addition, keymaps may be defined for use in 3270 mode or NVT mode
528 only. These keymaps use the suffixes .3270 and .nvt in their names,
529 respectively. If a keymap x3270.keymap.name.mode is defined, it will
530 augment the keymap x3270.keymap.name when x3270 is in the given mode.
531 If a keymap x3270.keymap.name.user.mode is defined, it will augment the
532 keymap x3270.keymap.name.user when x3270 is in the given mode.
533
534 The default translation table x3270.keymap.base is:
535
536 <Key>Multi_key Compose()
537 Shift<Key>Left KybdSelect(Left,PRIMARY)
538 <Key>Left Left()
539 Meta<Key>Right NextWord()
540 Shift<Key>Right KybdSelect(Right,PRIMARY)
541 <Key>Right Right()
542 Shift<Key>Up KybdSelect(Up,PRIMARY)
543 <Key>Up Up()
544 Shift<Key>Down KybdSelect(Down,PRIMARY)
545 <Key>Down Down()
546 Ctrl<Btn1Down> HandleMenu(quitMenu)
547 Ctrl<Btn2Down> HandleMenu(optionsMenu)
548 Ctrl<Btn3Down> HandleMenu(hostMenu)
549 Shift<Btn1Down> MoveCursor()
550 <Btn1Down> select-start()
551 <Btn1Motion> select-extend()
552 <Btn2Down> ignore()
553 <Btn2Motion> ignore()
554 <Btn2Up> insert-selection(PRIMARY)
555 <Btn3Down> start-extend()
556
557 <Btn3Motion> select-extend()
558 <BtnUp> select-end(PRIMARY)
559 Meta<Key>F1 PF(13)
560 Shift<Key>F1 PF(13)
561 Meta<Key>F2 PF(14)
562 Shift<Key>F2 PF(14)
563 Meta<Key>F3 PF(15)
564 Shift<Key>F3 PF(15)
565 Meta<Key>F4 PF(16)
566 Shift<Key>F4 PF(16)
567 Meta<Key>F5 PF(17)
568 Shift<Key>F5 PF(17)
569 Meta<Key>F6 PF(18)
570 Shift<Key>F6 PF(18)
571 Meta<Key>F7 PF(19)
572 Shift<Key>F7 PF(19)
573 Meta<Key>F8 PF(20)
574 Shift<Key>F8 PF(20)
575 Meta<Key>F9 PF(21)
576 Shift<Key>F9 PF(21)
577 Meta<Key>F10 PF(22)
578 Shift<Key>F10 PF(22)
579 Meta<Key>F11 PF(23)
580 Shift<Key>F11 PF(23)
581 Meta<Key>F12 PF(24)
582 Shift<Key>F12 PF(24)
583 <Key>F1 PF(1)
584 <Key>F2 PF(2)
585 <Key>F3 PF(3)
586 <Key>F4 PF(4)
587 <Key>F5 PF(5)
588 <Key>F6 PF(6)
589 <Key>F7 PF(7)
590 <Key>F8 PF(8)
591 <Key>F9 PF(9)
592 <Key>F10 PF(10)
593 <Key>F11 PF(11)
594 <Key>F12 PF(12)
595 Alt<Key>q Quit()
596 <Key>Prior Scroll(backward)
597 <Key>Next Scroll(forward)
598 :<Key> Default()
599
600 The default 3270-mode table x3270.keymap.base.3270 adds the following
601 definitions:
602
603 Shift<Key>Return Newline()
604 <Key>Return Enter()
605 <Key>Linefeed Newline()
606 Shift<Key>Tab BackTab()
607 <Key>Tab Tab()
608 <Key>Home Home()
609 Meta<Key>Left PreviousWord()
610 Meta<Key>Right NextWord()
611 <Key>Insert Insert()
612 <Key>Delete Delete()
613 <Key>BackSpace BackSpace()
614 Ctrl Shift<Btn1Down> MouseSelect()
615 Shift<Btn1Down> MoveCursor()
616 Meta<Key>1 PA(1)
617 Meta<Key>2 PA(2)
618 Meta<Key>3 PA(3)
619 Ctrl<Key>a SelectAll(PRIMARY)
620 Meta<Key>a Attn()
621 Meta<Key>b PrintWindow()
622 Ctrl<Key>c set-select(CLIPBOARD)
623 Meta<Key>c Clear()
624 Meta<Key>d Delete()
625 Meta<Key>e EraseEOF()
626 Meta<Key>f Flip()
627
628 Meta<Key>h Home()
629 Meta<Key>i Insert()
630 Meta<Key>l Redraw()
631 Meta<Key>p PrintText()
632 Meta<Key>r Reset()
633 Meta<Key>u Unselect()
634 Ctrl<Key>u DeleteField()
635 Ctrl<Key>v insert-
636 selection(CLIPBOARD)
637 Meta<Key>v ToggleReverse()
638 Ctrl<Key>w DeleteWord()
639 Ctrl<Key>x Cut(CLIPBOARD)
640
641 Meta is the diamond shaped key on a sun_k4, "Alt" on an NCD, "Extend
642 Char" on an HP. The following xmodmap command must be used on the NCD
643 to allow use the the "Alt" key:
644
645 xmodmap -e "keysym Alt_L = Meta_L"
646
647 The left mouse button may be used to make a selection. Clicking once
648 unselects the current selection. Clicking twice selects the word under
649 the mouse cursor. Clicking three times selects the line under the
650 mouse cursor. Clicking and dragging selects a rectangular area of the
651 display.
652
653 The middle mouse button may be used to paste a selection.
654
655 The right mouse button may also be used for selections, selecting the
656 rectangular area between the current position and where the left button
657 was last pressed.
658
659 On color X displays, the "x3270.selectBackground" resource is used to
660 distinguish the selected text from the rest of the screen. On
661 monochrome X displays, selected text is in reverse video. (It can be
662 distinguished from a block cursor because the block cursor covers
663 slightly less than an entire character position on the screen.)
664
665 The left mouse button, when pressed with the "Shift" key held down,
666 moves the 3270 cursor to the where the mouse cursor is pointing.
667
668 This is the complete list of keymap-callable actions. Other actions
669 are defined for use by scripts and are documented in x3270-script(1);
670 still others are defined for internal use by x3270 and are not
671 documented here. Note that when an action with no parameters is used
672 in a keymap, the parentheses and empty argument list are still
673 required.
674
675
676 Actions marked with an asterisk (*) may block, sending data to the host
677 and possibly waiting for a response.
678
679 *Attn() attention key
680 AltCursor() switch between block and
681 underscore cursor
682 BackSpace() move cursor left (or send
683 ASCII BS)
684 BackTab() tab to start of previous input
685 field
686 Charset(charset) change host code page
687 CircumNot() input "^" in NVT mode, or
688 "notsign" in 3270 mode
689 *Clear() clear screen
690 Compose() next two keys form a special
691 symbol
692 *Connect(host) connect to host
693 *CursorSelect() Cursor Select AID
694 Cut() copy highlighted area to
695 clipboard and erase
696 Default() enter key literally
697
698
699 Delete() delete character under cursor
700 (or send ASCII DEL)
701 DeleteField() delete the entire field
702 DeleteWord() delete the current or previous
703 word
704 *Disconnect() disconnect from host
705 Down() move cursor down
706 Dup()([failonerror|nofailonerror]) duplicate field
707 *Enter() Enter AID (or send ASCII CR)
708 Erase() erase previous character (or
709 send ASCII BS)
710 EraseEOF() erase to end of current field
711 EraseInput() erase all input fields
712 FieldEnd() move cursor to end of field
713 FieldMark()([failonerror|nofailonError]) mark field
714 HandleMenu(name) pop up a menu
715 HexString(hex_digits) insert control-character
716 string
717 Home() move cursor to first input
718 field
719 Insert() set insert mode
720 *Interrupt() send TELNET IP to host
721 Key(keysym[,failonerror|nofailonerror]) insert key keysym
722 Key(0xxx[,failonError|nofailonerror]) insert key with character code
723 xx
724 Keymap(keymap) toggle alternate keymap (or
725 remove with None)
726 KybdSelect(direction [,atom...]) Extend selection by one row or
727 column
728 Left() move cursor left
729 Left2() move cursor left 2 positions
730 *Macro(macro) run a macro
731 MonoCase() toggle uppercase-only mode
732 MoveCursor() move cursor to mouse position
733 MoveCursor(row,col) move cursor to zero-origin
734 (row,col)
735 *MoveCursorSelect() move cursor to mouse position,
736 light pen selection
737 Newline() move cursor to first field on
738 next line (or send ASCII LF)
739 NextWord() move cursor to next word
740 *PA(n) Program Attention AID (n from
741 1 to 3)
742 *PF(n) Program Function AID (n from 1
743 to 24)
744 PreviousWord() move cursor to previous word
745 PasteString(hex_digits) insert string using pasting
746 behavior
747 Printer(start[,lu]|stop) start or stop printer session
748 PrintText(command) print screen text on printer
749 PrintWindow(command) print screen image (bitmap) on
750 printer
751 Quit() exit x3270
752 *Reconnect() reconnect to previous host
753 Redraw() redraw window
754 Reset() reset locked keyboard
755 Right() move cursor right
756 Right2() move cursor right 2 positions
757 *Script(command[,arg...]) run a script
758 Scroll(forward|backward) scroll screen
759 SelectAll(atom) select entire screen
760 SetFont(font) change emulator font
761 *String(string) insert string (simple macro
762 facility)
763 Tab() move cursor to next input
764 field
765 Toggle(option[,set|clear]) toggle an option
766 ToggleInsert() toggle insert mode
767 ToggleReverse() toggle reverse-input mode
768 *Transfer(option=value...') file transfer
769
770 Unselect() release selection
771 Up() move cursor up
772 ──────────────────────────────────────────────────────────────────────────
773 (the following are similar to xterm)
774 ──────────────────────────────────────────────────────────────────────────
775 ignore do nothing
776 insert-selection([atom[,atom...]]) paste selection
777 move-select() a combination of MoveCursor
778 and select-start
779 select-end(atom[,atom...]]) complete selection and assign
780 to atom(s)
781 select-extend() move the end of a selection
782 select-start() mark the beginning of a
783 selection
784 set-select(atom[,atom...]]) assign existing selection to
785 atom(s)
786 start-extend() begin marking the end of a
787 selection
788
789 Note that certain parameters to x3270 actions (such as the names of
790 files and keymaps) are subject to substitutions:
791
792 The character ~ at the beginning of a string is replaced with the
793 user's home directory. A ~ character followed by a username is
794 replaced with that user's home directory.
795
796 Environment variables are substituted using the Unix shell convention
797 of $name or ${name}.
798
799 Two special pseudo-environment variables are supported. ${TIMESTAMP} is
800 replaced with a microsecond-resolution timestamp; ${UNIQUE} is replaced
801 with a string guaranteed to make a unique filename (the process ID
802 optionally followed by a dash and a string of digits). ${UNIQUE} is
803 used to form trace file names.
804
806 The PrintText() produces screen snapshots in a number of different
807 forms. The default form wth no arguments sends a copy of the screen to
808 the default printer. A single argument is the command to use to print,
809 e.g., lpr.
810
811 Multiple arguments can include keywords to control the output of
812 PrintText():
813
814 file,filename
815 Save the output in a file.
816
817 html Save the output as HTML. This option implies file.
818
819 rtf Save the output as RichText. This option implies file. The
820 font defaults to Courier New and the point size defaults to 8.
821 These can be overridden by the printTextFont and printTextSize
822 resources, respectively.
823
824 string Return the output as a string. This can only be used from
825 scripts.
826
827 modi Render modified fields in italics.
828
829 caption,text
830 Add the specified text as a caption above the output. Within
831 text, the special sequence %T% will be replaced with a
832 timestamp.
833
834 secure Disables the pop-up dialog.
835
836 command,command
837 Directs the output to a command. This allows one or more of the
838 other keywords to be specified, while still sending the output
839 to the printer.
840
841
843 There are several types of macros and script functions available.
844
845 The String Action
846 The simplest method for macros is provided via the String()
847 action, which can be bound to any key in a keymap. The
848 arguments to String() are one or more double-quoted strings
849 which are inserted directly as if typed. The C backslash
850 conventions are honored as follows. (Entries marked * mean that
851 after sending the AID code to the host, x3270 will wait for the
852 host to unlock the keyboard before further processing the
853 string.)
854
855 \b Left()
856 \exxxx EBCDIC character in hex
857 \f Clear()*
858 \n Enter()*
859 \pan PA(n)*
860 \pfnn PF(nn)*
861 \r Newline()
862 \t Tab()
863 \T BackTab()
864 \uxxxx Unicode character in hex
865 \xxxxx Unicode character in hex
866
867 Note that the numeric values for the \e, \u and \x sequences can
868 be abbreviated to 2 digits. Note also that EBCDIC codes greater
869 than 255 and some Unicode character codes represent DBCS
870 characters, which will work only if x3270 is built with DBCS
871 support and the host allows DBCS input in the current field.
872
873 An example keymap entry would be:
874 Meta<Key>p: String("probs clearrdr\n")
875
876 Note: The strings are in ASCII and converted to EBCDIC, so
877 beware of inserting control codes. Also, a backslash before a p
878 may need to be doubled so it will not be removed when a resource
879 file is read.
880
881 There is also an alternate form of the String() action,
882 HexString(), which is used to enter non-printing data. The
883 argument to HexString() is a string of hexadecimal digits, two
884 per character. A leading 0x or 0X is optional. In 3270 mode,
885 the hexadecimal data represent EBCDIC characters, which are
886 entered into the current field. In NVT mode, the hexadecimal
887 data represent ASCII characters, which are sent directly to the
888 host.
889
890 The Script Action
891 This action causes x3270 to start a child process which can
892 execute x3270 actions. Standard input and output from the child
893 process are piped back to x3270. The Script() action is fully
894 documented in x3270-script(1).
895
896 The macros Resource
897 An alternate method of defining macros is the "x3270.macros"
898 resource. This resource is similar to a keymap, but instead of
899 defining keyboard mappings, it associates a list of X actions
900 with a name. These names are displayed on a Macros menu that
901 appears when x3270 is connected to a host. Selecting one of the
902 names on the menu executes the X actions associated with it.
903 Typically the actions are String() calls, but any action may be
904 specified. Here is a sample macros resource definition, which
905 would result in a four-entry Macros menu:
906 x3270.macros: \
907 log off: String("logout\n")\n\
908 vtam: String("dial vtam\n")\n\
909 pa1: PA(1)\n\
910 alt printer: PrintText("lpr -Plw2")
911
912 You can also define a different set of macros for each host. If
913 there is a resource named `x3270.macros.somehost', it defines
914 the macros menu for when x3270 is connected to somehost.
915
916 The -script Option
917 This facility allows x3270 to operate under the complete control
918 of a script. x3270 accepts actions from standard input, and
919 prints results on standard output. The -script option is fully
920 documented in x3270-script(1).
921
923 x3270 allows the direct entry of accented letters and special symbols.
924 Pressing and releasing the "Compose" key, followed by two other keys,
925 causes entry of the symbol combining those two keys. For example,
926 "Compose" followed by the "C" key and the "," (comma) key, enters the
927 "C-cedilla" symbol. A C on the status line indicates a pending
928 composite character.
929
930 The mappings between these pairs of ordinary keys and the symbols they
931 represent is controlled by the "x3270.composeMap" resource; it gives
932 the name of the map to use. The maps themselves are named
933 "x3270.composeMap.name". The default is "latin1", which gives mappings
934 for most of the symbols in the ISO 8859-1 Latin-1 character set that
935 are not in the 7-bit ASCII character set.
936
937 Note: The default keymap defines the "Multi_key" keysym as the
938 "Compose" key. If your keyboard lacks such a key, you may set up your
939 own "Compose" key with a keymap that maps some other keysym onto the
940 Compose() action.
941
943 x3270 supports the full APL2 character set and the entry of APL
944 characters from the keyboard.
945
946 APL characters are supported only in the special 3270 font.
947
948 Keyboard entry of APL characters is supported through the apl keymap
949 modifier. This modifier defines the "Alt" key as an APL shift key,
950 with a typical APL keyboard layout, e.g., "Alt" pressed with the A key
951 results in the APL "alpha" symbol. Overstruck characters such as
952 "quad-quote" are not defined as single keystrokes; instead they are
953 entered as composites (see COMPOSITE CHARACTERS above). A special
954 composite map, apl, is provided for this purpose.
955
956 Note: Some keyboards do not define the "Alt" key as a modifier, so
957 keymaps that use the "Alt" key will not function. On a Sun for
958 example, this can be remedied with the command:
959
960 xmodmap -e "add mod2 = Alt_L"
961
962 For convenience, an -apl option is defined, which is an abbreviation
963 for the following resource definitions:
964 x3270.keymap: your_keymap_name,apl
965 x3270.charset: apl
966 x3270.composeMap: apl
967
968 There are a number of APL characters that are similar in appearance to
969 non-APL characters. In particular, the APL "stile", "slope," "tilde"
970 and "quotedot" characters are similar to the EBCDIC "bar", "backslash,"
971 "tilde" and "exclaim" characters. The APL characters are entered with
972 the "Alt" key, and have slightly different appearances.
973
974 The complete list of special APL keysyms is as follows. Entries marked
975 with an asterisk (*) represent simple aliases for standard EBCDIC
976 characters. Entries marked with an (S) represent Sharp APL charatcers.
977
978 APL Symbol Hex x3270 apl_ x3270 Key x3270
979 Keysym Composed Keys
980 ────────────────────────────────────────────────────────────────
981 A underbar 41 Aunderbar Alt-A A + underbar
982
983 alpha B0 alpha Alt-a
984 B underbar 42 Bunderbar Alt-B B + underbar
985 bar 60* bar -
986 brace left C0 braceleft Alt-{
987 brace right D0 braceright Alt-}
988 C underbar 43 Cunderbar Alt-C C + underbar
989 circle 9D circle Alt-o
990 circle bar ED circlebar circle + bar
991 circle slope CF circleslope circle +
992 slope
993 circle star FD circlestar circle + star
994 circle stile CD circlestile circle +
995 stile
996 colon 7A* colon :
997 comma 6B* comma ,
998 comma bar (S) E5 commabar comma + bar
999 D underbar 44 Dunderbar Alt-D D + underbar
1000 del BA del Alt-g
1001 del stile DC delstile del + stile
1002 del tilde FB deltilde del + tilde
1003 delta BB delta Alt-h
1004 delta stile DD deltastile delta + stile
1005 delta FC deltaunderbar delta +
1006 underbar underbar
1007 diamond 70 diamond up caret +
1008 down caret
1009 dieresis 72 dieresis Alt-1
1010 dieresis E5 dieresis‐ dieresis +
1011 circle (S) circle circle
1012 dieresis dot EC dieresisdot dieresis +
1013 dot
1014 dieresis jot E4 dieresisjot dieresis +
1015 (S) jot
1016 divide B8 divide Alt-+
1017 dot 4B* dot
1018 down arrow 8B downarrow Alt-u
1019 down caret 78 downcaret Alt-9
1020 down caret CB downcaret‐ down caret +
1021 tilde tilde tilde
1022 down shoe AB downshoe Alt-v
1023 down stile 8E downstile Alt-d
1024 down tack AC downtack Alt-b
1025 down tack jot FE downtackjot down tack +
1026 jot
1027 down tack up DA downtack‐ down tack +
1028 tack uptack up tack
1029 E underbar 45 Eunderbar Alt-E E + underbar
1030 epsilon B1 epsilon Alt-e
1031 epsilon 75 epsilon‐ epsilon +
1032 underbar underbar underbar
1033 equal 7E* equal "="
1034 equal E1 equalunderbar equal +
1035 underbar underbar
1036 euro (S) E7 euro C + =
1037 F underbar 46 Funderbar Alt-F F + underbar
1038 G underbar 47 Gunderbar Alt-G G + underbar
1039 greater 6E* greater >
1040 H underbar 48 Hunderbar Alt-H H + underbar
1041 I underbar 49 Iunderbar Alt-I I + underbar
1042 iota B2 iota Alt-i
1043 iota underbar 74 iotaunderbar iota +
1044 underbar
1045 J underbar 51 Junderbar Alt-J J + underbar
1046 jot AF jot alt-j
1047 K underbar 52 Kunderbar Alt-K K + underbar
1048 L underbar 53 Lunderbar Alt-L L + underbar
1049 left arrow 9F leftarrow Alt-[
1050 left bracket AD leftbracket [
1051 left paren 4D* leftparen (
1052 left shoe 9B leftshoe Alt-z
1053
1054 less 4C* less <
1055 M underbar 54 Munderbar Alt-M M + underbar
1056 N underbar 55 Nunderbar Alt-N N + underbar
1057 not equal BE notequal Alt-8 equal + slash
1058 not greater 8C notgreater Alt-4 less + equal
1059 not less AE notless Alt-6 greater +
1060 equal
1061 O underbar 56 Ounderbar Alt-O O + underbar
1062 omega B4 omega Alt-w
1063 overbar A0 overbar Alt-2
1064 P underbar 57 Punderbar Alt-P P + underbar
1065 plus 4E* plus +
1066 Q underbar 58 Qunderbar Alt-Q Q + underbar
1067 quad 90 quad Alt-l
1068 quad divide EE quaddivide quad + divide
1069 quad jot 73 quadjot quad + jot
1070 quad quote DE quadquote quad + quote
1071 quad slope CE quadslope quad + slope
1072 query 6F* query ?
1073 quote 7D* quote
1074 quote dot DB quotedot quote + dot
1075 R underbar 59 Runderbar Alt-R R + underbar
1076 rho B3 rho Alt-r
1077 right arrow 8F rightarrow Alt-]
1078 right bracket BD rightbracket ]
1079 right paren 5D* rightparen )
1080 right shoe 9A rightshoe Alt-x
1081 S underbar 62 Sunderbar Alt-S S + underbar
1082 semicolon 5E* semicolon ;
1083 slash 61* slash /
1084 slash bar EA slashbar slash + bar
1085 slope B7 slope Alt-\
1086 slope bar EB slopebar slope + bar
1087 squad CC squad quad + quad
1088 star 5C* star *
1089 stile BF stile Alt-|
1090 T underbar 63 Tunderbar Alt-T T + underbar
1091 tilde 80 tilde Alt-~
1092 times B6 times Alt-=
1093 U underbar 64 Uunderbar Alt-U U + underbar
1094 underbar 6D* underbar "_"
1095 up arrow 8A uparrow Alt-y
1096 up caret 71 upcaret Alt-0
1097 up caret CA upcarettilde up caret +
1098 tilde tilde
1099 up shoe AA upshoe Alt-c
1100 up shoe jot DF upshoejot up shoe + jot
1101 up stile 8D upstile Alt-s
1102 up tack BC uptack Alt-n
1103 up tack jot EF uptackjot up tack + jot
1104 V underbar 65 Vunderbar Alt-V V + underbar
1105 W underbar 66 Wunderbar Alt-W W + underbar
1106 X underbar 67 Xunderbar Alt-X X + underbar
1107 Y underbar 68 Yunderbar Alt-Y Y + underbar
1108 Z underbar 69 Zunderbar Alt-Z Z + underbar
1109
1111 When compiled with DBCS support, x3270 supports multi-byte input
1112 methods via the XIM protocol.
1113
1114 The input method is selected by the XMODIFIERS environment variable or
1115 the -im command-line option.
1116
1117 The preedit type is specified by the -pt command-line option, with a
1118 default of OverTheSpot+1.
1119
1121 Screen printing is handled through options on the File menu or by the
1122 PrintText() and PrintWindow() actions. Each results in a pop-up to
1123 confirm the print command.
1124
1125 The PrintText() action (usually assigned to the key <Meta>p) sends the
1126 current screen image to the printer as ASCII characters. The default
1127 command used to print the data is controlled by the
1128 "x3270.printTextCommand" resource; the default is lpr. You may also
1129 use a keymap definition to pass a print command the PrintText() action
1130 itself. The command receives the screen text as its standard input.
1131 For example, the following keymap will save the screen text in a file:
1132
1133 Meta<Key>f: PrintText("cat >screen.image")
1134
1135 The PrintWindow() action (usually assigned to the key <Meta>b) sends
1136 the current screen image to the printer as a bitmap. The default
1137 command used to print the data is controlled by the
1138 "x3270.printWindowCommand" resource; the default is
1139
1140 xwd -id %d | xpr | lpr.
1141
1142 You may also use a keymap definition to pass a print command to the
1143 PrintWindow() action itself. If the command contains the text "%d",
1144 the window ID of x3270 will be substituted before it is run. For
1145 example, the following keymap will pop up a duplicate of the current
1146 screen image:
1147
1148 Meta<Key>g: PrintWindow("xwd -id %d | xwud &")
1149
1150 If the command for PrintWindow() or PrintText() begins with an "@"
1151 character, the initial pop-up menu to confirm the print command is not
1152 displayed and the command cannot be edited.
1153
1155 Cursor highlighting will not work with if you use the NoTitleFocus
1156 option in your .twmrc file.
1157
1158
1160 x3270 supports the Sun telnet-passthru service provided by the
1161 in.telnet-gw server. This allows outbound telnet connections through a
1162 firewall machine. When a P: is prepended to a hostname, x3270 acts
1163 much like the itelnet(1) command. It contacts the machine named
1164 internet-gateway at the port defined in /etc/services as telnet-
1165 passthru (which defaults to 3514). It then passes the requested
1166 hostname and port to the in.telnet-gw server.
1167
1169 The -proxy option or the x3270.proxy resource causes x3270 to use a
1170 proxy server to connect to the host. The syntax of the option or
1171 resource is:
1172 type:[username:password@]host[:port]
1173
1174 The supported values for type are:
1175
1176 Proxy Type Protocol Default Port
1177 ──────────────────────────────────────────────
1178 http RFC 2817 HTTP 3128
1179 tunnel (squid)
1180 passthru Sun in.telnet-gw none
1181 socks4 SOCKS version 4 1080
1182 socks5 SOCKS version 5 1080
1183 (RFC 1928)
1184 telnet No protocol (just none
1185 send connect host
1186 port)
1187
1188 The special types socks4a and socks5d can also be used to force the
1189 proxy server to do the hostname resolution for the SOCKS protocol.
1190 Note that only the http and socks5 proxies support a username and
1191 password.
1192
1194 /etc/ibm_hosts
1195 $HOME/.x3270pro
1196
1197
1199 3270PRO Path of profile file, containing resource definitions. Merged
1200 after the system resource database, but before X3270RDB. Defaults to
1201 $HOME/.x3270pro.
1202 NOX3270PRO If set, do not read the profile.
1203 X3270RDB Additional resource definitions, merged after the profile file
1204 but before the command-line options.
1205 KEYMAP Keymap name.
1206 KEYBD Keymap name.
1207
1209 pr3287(1), s3270(1), x3270-script(1), c3270(1), telnet(1), tn3270(1),
1210 ibm_hosts(5)
1211 X Toolkit Intrinsics
1212 Data Stream Programmer's Reference, IBM GA23-0059
1213 Character Set Reference, IBM GA27-3831
1214 RFC 1576, TN3270 Current Practices
1215 RFC 1646, TN3270 Extensions for LUname and Printer Selection
1216 RFC 2355, TN3270 Enhancements
1217
1219 Copyright 1993-2020, Paul Mattes.
1220 Copyright 2004-2005, Don Russell.
1221 Copyright 2004, Dick Altenbern.
1222 Copyright 1990, Jeff Sparkes.
1223 Copyright 1989, Georgia Tech Research Corporation (GTRC), Atlanta, GA
1224 30332.
1225 All rights reserved.
1226
1227 Redistribution and use in source and binary forms, with or without
1228 modification, are permitted provided that the following conditions are
1229 met:
1230
1231
1232 * Redistributions of source code must retain the above copyright
1233 notice, this list of conditions and the following disclaimer.
1234
1235 * Redistributions in binary form must reproduce the above
1236 copyright notice, this list of conditions and the following
1237 disclaimer in the documentation and/or other materials provided
1238 with the distribution.
1239
1240 * Neither the names of Paul Mattes, Don Russell, Dick Altenbern,
1241 Jeff Sparkes, GTRC nor the names of their contributors may be
1242 used to endorse or promote products derived from this software
1243 without specific prior written permission.
1244
1245
1246 THIS SOFTWARE IS PROVIDED BY PAUL MATTES, DON RUSSELL, DICK ALTENBERN,
1247 JEFF SPARKES AND GTRC "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
1248 INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
1249 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
1250 NO EVENT SHALL PAUL MATTES, DON RUSSELL, DICK ALTENBERN, JEFF SPARKES
1251 OR GTRC BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL
1252 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
1253 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
1254 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
1255 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
1256 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
1257 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1258
1260 x3270 4.0ga12
1261
1262
1263
1264 26 September 2020 x3270(1)