SWIN(1) General Commands Manual SWIN(1)
swin - set or get SunView user input options
swin [ -cghm ] [ -r event value shift_state ] [ -s event value
shift_state ] [ -t seconds ]
This command is available with the software installation option. Refer
to for information on how to install optional software.
The swin (set window; analogous to stty(1V)) command lets you change
some of the input behavior of your SunView environment. By default,
your keyboard input follows your pointer. This means that in order to
type to a window you position the pointer over the window. This is
called keyboard-follows-mouse mode.
You can specify that the keyboard input continues to go to the same
window, regardless of the pointer position, until you take some spe-
cific action, like clicking the mouse. When this is done, you can roam
around the screen with the pointer and not change the window to which
keyboard input is directed. Running SunView like this is said to be
operating in click-to-type mode.
When running in click-to-type mode, one user action sets the type-in
point in the window that you want to receive keyboard input. The
default user action to do this is the clicking of the LEFT mouse button
while positioning the pointer over the new type-in point. This user
action can be changed.
Another user action restores the previous type-in point in the window
that you want to receive keyboard input. The default user action to do
this is the clicking of the MIDDLE mouse button while positioning the
pointer over the window. This user action can be changed.
-c Turn on click-to-type mode using the default user actions: the
LEFT mouse button sets the type-in point and the MIDDLE mouse
button restores the type-in point. You can use the default-
sedit(1) program to set click-to-type on permanently; see the
Click_to_Type option of sunview(1).
-g Get the state of the user input options controlled by swin. If
no arguments are supplied to swin then -g is implied.
-h Print out a help message that briefly describes the options to
-m Run in keyboard-follows-mouse mode.
-s event value shift_state
Set the user action that sets the type-in point and sets the
keyboard input window. The event identifies the particular user
action and is one of:
pointer entering a window
LEFT mouse button
MIDDLE mouse button
RIGHT mouse button
place the decimal number of a firm event here; see list
of events in <<sundev/vuid_event.h>> (avoid function keys,
normally unused control-ASCII characters are OK, normally
unused SHIFT keys are OK).
value identifies the transition of the event and is one of:
ENTER the pointer entering a window (use with LOC_WINENTER)
DOWN the button associated with event went down
UP the button associated with event went up (avoid this)
The shift_state identifies the state of the SHIFT keys at the
time of the event/value pair in order for that pair to be used
to control the keyboard input window. The shift_state is one
Ignore the state of the SHIFT keys
All the SHIFT keys must be up
The left SHIFT key must be down (not the key labeled
the right SHIFT key must be down (not the key labeled
the left CTRL key must be down
the right CTRL key must be down
-r event value shift_state
Set the user action that restores the type-in point and sets the
keyboard input window. This user action is swallowed so that
the application that owns the window does not see it. However,
if the window already has keyboard input or if the window
refuses keyboard input then this user action is passed on
through to the application. The parameters to this command are
like those for -s. The following example shows modifying the
default click-to-type user actions so that a SHIFT left is
required for the restore user event:
example% swin -c -r MS_MIDDLE DOWN SHIFT_LEFT
SunView synchronizes input so that it does not hand out the next
user action until the application fielding the current user
action finishes its processing. This allows type-ahead and
mouse-ahead. If an application does not finish processing
within a given length of time (process virtual time; not wall
clock time), the next user action is handed out anyway. This
avoids any one application from hanging the workstation. The -t
command sets this time limit. A seconds value of 0 tells Sun-
View to run unsynchronized; beware of race conditions in this
mode. The default seconds value is 2 and the -c command makes
it 10 seconds.
defaultsedit(1), stty(1V), sunview(1)
swin not passed parent window in environment
swin does not work unless SunView is started already.
swin gets you no help in preventing you from specifying -r or -s param-
eters that are not sensible.
21 December 1987 SWIN(1)