|
|
|
VMS freeware XTERM
Actions
It is possible to rebind keys (or sequences of keys) to arbitrary strings
for input, by changing the translations for the vt100 or tek4014 widgets.
Changing the translations for events other than key and button events is
not expected, and will cause unpredictable behavior. The following actions
are provided for using within the vt100 or tek4014 translations resources:
allow-send-events(on/off/toggle)
This action set or toggles the allowSendEvents resource and is also
invoked by the allowsends entry in mainMenu.
bell([percent])
This action rings the keyboard bell at the specified percentage
above or below the base volume.
clear-saved-lines()
This action does hard-reset() (see above) and also clears the
history of lines saved off the top of the screen. It is also
invoked from the clearsavedlines entry in vtMenu.
create-menu(m/v/f/t)
This action creates one of the menus used by xterm, if it has not
been previously created. The parameter values are the menu names:
mainMenu, vtMenu, fontMenu, tekMenu, respectively.
deiconify()
Changes the window state back to normal, if it was iconified.
dired-button()
Handles a button event (other than press and release) by echoing
the event's position (i.e., character line and column) in the fol-
lowing format:
^X ESC G <line+' '> <col+' '>
iconify()
Iconifies the window.
hard-reset()
This action resets the scrolling region, tabs, window size, and
cursor keys and clears the screen. It is also invoked from the
hardreset entry in vtMenu.
ignore()
This action ignores the event but checks for special pointer posi-
tion escape sequences.
insert()
This action inserts the character or string associated with the key
that was pressed.
insert-eight-bit()
This action inserts an eight-bit (Meta) version of the character or
string associated with the key that was pressed. The exact action
depends on the value of the metaSendsEscape and the eightBitInput
resources.
insert-selection(sourcename [, ...])
This action inserts the string found in the selection or cutbuffer
indicated by sourcename. Sources are checked in the order given
(case is significant) until one is found. Commonly-used selections
include: PRIMARY, SECONDARY, and CLIPBOARD. Cut buffers are typi-
cally named CUT_BUFFER0 through CUT_BUFFER7.
insert-seven-bit()
This action is a synonym for insert()
interpret(control-sequence)
Interpret the given control sequence locally, i.e., without passing
it to the host. This works by inserting the control sequence at
the front of the input buffer. Use "\" to escape octal digits in
the string. Xt does not allow you to put a null character (i.e.,
"\000") in the string.
keymap(name)
This action dynamically defines a new translation table whose
resource name is name with the suffix Keymap (case is significant).
The name None restores the original translation table.
maximize()
Resizes the window to fill the screen.
popup-menu(menuname)
This action displays the specified popup menu. Valid names (case
is significant) include: mainMenu, vtMenu, fontMenu, and tekMenu.
print() This action prints the window and is also invoked by the print
entry in mainMenu.
quit() This action sends a SIGHUP to the subprogram and exits. It is also
invoked by the quit entry in mainMenu.
redraw()
This action redraws the window and is also invoked by the redraw
entry in mainMenu.
restore()
Restores the window to the size before it was last maximized.
scroll-back(count [,units])
This action scrolls the text window backward so that text that had
previously scrolled off the top of the screen is now visible. The
count argument indicates the number of units (which may be page,
halfpage, pixel, or line) by which to scroll.
scroll-forw(count [,units])
This action scrolls is similar to scroll-back except that it
scrolls the other direction.
secure()
This action toggles the Secure Keyboard mode described in the sec-
tion named SECURITY, and is invoked from the securekbd entry in
mainMenu.
select-cursor-end(destname [, ...])
This action is similar to select-end except that it should be used
with select-cursor-start.
select-cursor-start()
This action is similar to select-start except that it begins the
selection at the current text cursor position.
select-end(destname [, ...])
This action puts the currently selected text into all of the selec-
tions or cutbuffers specified by destname.
select-extend()
This action tracks the pointer and extends the selection. It
should only be bound to Motion events.
select-set()
This action stores text that corresponds to the current selection,
without affecting the selection mode.
select-start()
This action begins text selection at the current pointer location.
See the section on POINTER USAGE for information on making selec-
tions.
send-signal(signame)
This action sends the signal named by signame to the xterm subpro-
cess (the shell or program specified with the -e command line
option) and is also invoked by the suspend, continue, interrupt,
hangup, terminate, and kill entries in mainMenu. Allowable signal
names are (case is not significant): tstp (if supported by the
operating system), suspend (same as tstp), cont (if supported by
the operating system), int, hup, term, quit, alrm, alarm (same as
alrm) and kill.
set-allow132(on/off/toggle)
This action toggles the c132 resource and is also invoked from the
allow132 entry in vtMenu.
set-altscreen(on/off/toggle)
This action toggles between the alternate and current screens.
set-appcursor(on/off/toggle)
This action toggles the handling Application Cursor Key mode and is
also invoked by the appcursor entry in vtMenu.
set-appkeypad(on/off/toggle)
This action toggles the handling of Application Keypad mode and is
also invoked by the appkeypad entry in vtMenu.
set-autolinefeed(on/off/toggle)
This action toggles automatic insertion of linefeeds and is also
invoked by the autolinefeed entry in vtMenu.
set-autowrap(on/off/toggle)
This action toggles automatic wrapping of long lines and is also
invoked by the autowrap entry in vtMenu.
set-backarrow(on/off/toggle)
This action toggles the backarrowKey resource and is also invoked
from the backarrow key entry in vtMenu.
set-cursorblink(on/off/toggle)
This action toggles the cursorBlink resource and is also invoked
from the cursorblink entry in vtMenu.
set-cursesemul(on/off/toggle)
This action toggles the curses resource and is also invoked from
the cursesemul entry in vtMenu.
set-font-doublesize(on/off/toggle)
This action toggles the fontDoublesize resource and is also invoked
by the font-doublesize entry in fontMenu.
set-hp-functionkeys(on/off/toggle)
This action toggles the hpFunctionKeys resource and is also invoked
by the hp function-keys entry in mainMenu.
set-jumpscroll(on/off/toggle)
This action toggles the jumpscroll resource and is also invoked by
the jumpscroll entry in vtMenu.
set-logging()
This action toggles the state of the logging option.
set-marginbell(on/off/toggle)
This action toggles the marginBell resource and is also invoked
from the marginbell entry in vtMenu.
set-num-lock()
This action toggles the state of the numLock resource.
set-reverse-video(on/off/toggle)
This action toggles the reverseVideo resource and is also invoked
by the reversevideo entry in vtMenu.
set-reversewrap(on/off/toggle)
This action toggles the reverseWrap resource and is also invoked by
the reversewrap entry in vtMenu.
set-scroll-on-key(on/off/toggle)
This action toggles the scrollKey resource and is also invoked from
the scrollkey entry in vtMenu.
set-scroll-on-tty-output(on/off/toggle)
This action toggles the scrollTtyOutput resource and is also
invoked from the scrollttyoutput entry in vtMenu.
set-scrollbar(on/off/toggle)
This action toggles the scrollbar resource and is also invoked by
the scrollbar entry in vtMenu.
set-sun-functionkeys(on/off/toggle)
This action toggles the sunFunctionKeys resource and is also
invoked by the sun function-keys entry in mainMenu.
set-sun-keyboard(on/off/toggle)
This action toggles the sunKeyboard resource and is also invoked by
the sun keyboard entry in mainMenu.
set-tek-text(large/2/3/small)
This action sets font used in the Tektronix window to the value of
the resources tektextlarge, tektext2, tektext3, and tektextsmall
according to the argument. It is also by the entries of the same
names as the resources in tekMenu.
set-terminal-type(type)
This action directs output to either the vt or tek windows, accord-
ing to the type string. It is also invoked by the tekmode entry in
vtMenu and the vtmode entry in tekMenu.
set-titeInhibit(on/off/toggle)
This action toggles the titeInhibit resource, which controls
switching between the alternate and current screens.
set-visibility(vt/tek,on/off/toggle)
This action controls whether or not the vt or tek windows are visi-
ble. It is also invoked from the tekshow and vthide entries in
vtMenu and the vtshow and tekhide entries in tekMenu.
set-visual-bell(on/off/toggle)
This action toggles the visualBell resource and is also invoked by
the visualbell entry in vtMenu.
set-vt-font(d/1/2/3/4/5/6/e/s [,normalfont [, boldfont]])
This action sets the font or fonts currently being used in the
VT102 window. The first argument is a single character that speci-
fies the font to be used: d or D indicate the default font (the
font initially used when xterm was started), 1 through 6 indicate
the fonts specified by the font1 through font6 resources, e or E
indicate the normal and bold fonts that have been set through
escape codes (or specified as the second and third action argu-
ments, respectively), and s or S indicate the font selection (as
made by programs such as xfontsel(1)) indicated by the second
action argument.
soft-reset()
This action resets the scrolling region and is also invoked from
the softreset entry in vtMenu.
start-extend()
This action is similar to select-start except that the selection is
extended to the current pointer location.
start-cursor-extend()
This action is similar to select-extend except that the selection
is extended to the current text cursor position.
string(string)
This action inserts the specified text string as if it had been
typed. Quotation is necessary if the string contains whitespace or
non-alphanumeric characters. If the string argument begins with
the characters ``0x'', it is interpreted as a hex character con-
stant.
tek-copy()
This action copies the escape codes used to generate the current
window contents to a file in the current directory beginning with
the name COPY. It is also invoked from the tekcopy entry in tek-
Menu.
tek-page()
This action clears the Tektronix window and is also invoked by the
tekpage entry in tekMenu.
tek-reset()
This action resets the Tektronix window and is also invoked by the
tekreset entry in tekMenu.
vi-button()
Handles a button event (other than press and release) by echoing a
control sequence computed from the event's line number in the
screen relative to the current line:
ESC ^P
or
ESC ^N
according to whether the event is before, or after the current
line, respectively. The ^N (or ^P) is repeated once for each line
that the event differs from the current line. The control sequence
is omitted altogether if the button event is on the current line.
visual-bell()
This action flashes the window quickly.
The Tektronix window also has the following action:
gin-press(l/L/m/M/r/R)
This action sends the indicated graphics input code.
The default bindings in the VT102 window are:
Shift <KeyPress> Prior:scroll-back(1,halfpage) \n\
Shift <KeyPress> Next:scroll-forw(1,halfpage) \n\
Shift <KeyPress> Select:select-cursor-start() \
select-cursor-end(PRIMARY, CUT_BUFFER0) \n\
Shift <KeyPress> Insert:insert-selection(PRIMARY, CUT_BUFFER0) \n\
~Meta <KeyPress>:insert-seven-bit() \n\
Meta <KeyPress>:insert-eight-bit() \n\
!Ctrl <Btn1Down>:popup-menu(mainMenu) \n\
!Lock Ctrl <Btn1Down>:popup-menu(mainMenu) \n\
!Lock Ctrl @Num_Lock <Btn1Down>:popup-menu(mainMenu) \n\
! @Num_Lock Ctrl <Btn1Down>:popup-menu(mainMenu) \n\
~Meta <Btn1Down>:select-start() \n\
~Meta <Btn1Motion>:select-extend() \n\
!Ctrl <Btn2Down>:popup-menu(vtMenu) \n\
!Lock Ctrl <Btn2Down>:popup-menu(vtMenu) \n\
!Lock Ctrl @Num_Lock <Btn2Down>:popup-menu(vtMenu) \n\
! @Num_Lock Ctrl <Btn2Down>:popup-menu(vtMenu) \n\
~Ctrl ~Meta <Btn2Down>:ignore() \n\
Meta <Btn2Down>:clear-saved-lines() ~Ctrl ~Meta <Btn2Up>:insert-selection(PRIMARY, CUT_BUFFER0) \n\
!Ctrl <Btn3Down>:popup-menu(fontMenu) \n\
!Lock Ctrl <Btn3Down>:popup-menu(fontMenu) \n\
!Lock Ctrl @Num_Lock <Btn3Down>:popup-menu(fontMenu) \n\
! @Num_Lock Ctrl <Btn3Down>:popup-menu(fontMenu) \n\
~Ctrl ~Meta <Btn3Down>:start-extend() \n\
~Meta <Btn3Motion>:select-extend() \n\
Ctrl <Btn4Down>:scroll-back(1,halfpage) \n\
Lock Ctrl <Btn4Down>:scroll-back(1,halfpage) \n\
Lock @Num_Lock Ctrl <Btn4Down>:scroll-back(1,halfpage) \n\
@Num_Lock Ctrl <Btn4Down>:scroll-back(1,halfpage) \n\
<Btn4Down>:scroll-back(5,line) \n\
Ctrl <Btn5Down>:scroll-forw(1,halfpage) \n\
Lock Ctrl <Btn5Down>:scroll-forw(1,halfpage) \n\
Lock @Num_Lock Ctrl <Btn5Down>:scroll-forw(1,halfpage) \n\
@Num_Lock Ctrl <Btn5Down>:scroll-forw(1,halfpage) \n\
<Btn5Down>:scroll-forw(5,line) \n\
<BtnUp>:select-end(PRIMARY, CUT_BUFFER0) \n\
<BtnDown>:bell(0)
The default bindings in the Tektronix window are:
~Meta<KeyPress>: insert-seven-bit() \n\
Meta<KeyPress>: insert-eight-bit() \n\
!Ctrl <Btn1Down>: popup-menu(mainMenu) \n\
!Lock Ctrl <Btn1Down>: popup-menu(mainMenu) \n\
!Lock Ctrl @Num_Lock <Btn1Down>:popup-menu(mainMenu) \n\
!Ctrl @Num_Lock <Btn1Down>:popup-menu(mainMenu) \n\
!Ctrl <Btn2Down>: popup-menu(tekMenu) \n\
!Lock Ctrl <Btn2Down>: popup-menu(tekMenu) \n\
!Lock Ctrl @Num_Lock <Btn2Down>:popup-menu(tekMenu) \n\
!Ctrl @Num_Lock <Btn2Down>:popup-menu(tekMenu) \n\
Shift ~Meta<Btn1Down>:gin-press(L) \n\
~Meta<Btn1Down>:gin-press(l) \n\
Shift ~Meta<Btn2Down>:gin-press(M) \n\
~Meta<Btn2Down>:gin-press(m) \n\
Shift ~Meta<Btn3Down>:gin-press(R) \n\
~Meta<Btn3Down>:gin-press(r)
Below is a sample how of the keymap() action is used to add special keys
for entering commonly-typed works:
*VT100.Translations: #override <Key>F13: keymap(dbx)
*VT100.dbxKeymap.translations: \
<Key>F14: keymap(None) \n\
<Key>F17: string("next") string(0x0d) \n\
<Key>F18: string("step") string(0x0d) \n\
<Key>F19: string("continue") string(0x0d) \n\
<Key>F20: string("print ") insert-selection(PRIMARY, CUT_BUFFER0)
GoTo Top
Please, take the time to sign our guest-book. It will help us
to keep working on software and information you can find on this site.
|