Manual page for SWIN(1)
swin - set or get SunView user input options
SYNOPSIS
swin
[
-cghm
]
[
-r
event
value
shift_state
]
[
-s
event
value
shift_state
]
[
-t
seconds
]
AVAILABILITY
This command is available with the
[a manual with the abbreviation SVBG]
software installation option. Refer to
[a manual with the abbreviation INSTALL]
for information on how to install optional software.
DESCRIPTION
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 specific 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.
OPTIONS
- -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
defaultsedit.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
swin.
- -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:
-
- LOC_WINENTER
-
pointer entering a window
- MS_LEFT
-
LEFT
mouse button
- MS_MIDDLE
-
MIDDLE
mouse button
- MS_RIGHT
-
RIGHT
mouse button
- decimal_number
-
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 of:
- SHIFT_DONT_CARE
-
Ignore the state of the
SHIFT
keys
- SHIFT_ALL_UP
-
All the
SHIFT
keys must be up
- SHIFT_LEFT
-
The left
SHIFT
key must be down (not the key labeled
LEFT)
- SHIFT_RIGHT
-
the right
SHIFT
key must be down (not the key labeled
RIGHT)
- SHIFT_LEFTCTRL
-
the left
CTRL
key must be down
- SHIFT_RIGHTCTRL
-
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
- -t seconds
-
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 SunView to run unsynchronized;
beware of race conditions in this mode. The default seconds value
is 2 and the
-c
command makes it 10 seconds.
SEE ALSO
defaultsedit.1
stty.1v
sunview.1
[a manual with the abbreviation SVBG]
DIAGNOSTICS
- swin not passed parent window in environment
-
swin
does not work unless SunView is started already.
BUGS
swin
gets you no help in preventing you from specifying
-r
or
-s
parameters that are not sensible.
Created by unroff & hp-tools.
© somebody (See intro for details). All Rights Reserved.
Last modified 11/5/97