


SWIN(1)                  USER COMMANDS                    SWIN(1)



NAME
     swin - set or get SunView user input options

SYNOPSIS
     swin [ -cghm ] [ -r _e_v_e_n_t _v_a_l_u_e _s_h_i_f_t__s_t_a_t_e  ]  [  -s  _e_v_e_n_t
     _v_a_l_u_e _s_h_i_f_t__s_t_a_t_e ] [ -t _s_e_c_o_n_d_s ]

AVAILABILITY
     This command is available  with  the  _S_u_n_V_i_e_w  _U_s_e_r'_s  _G_u_i_d_e
     software installation option.  Refer to _I_n_s_t_a_l_l_i_n_g _S_u_n_O_S _4._1
     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
     _k_e_y_b_o_a_r_d-_f_o_l_l_o_w_s-_m_o_u_s_e 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 _c_l_i_c_k-_t_o-_t_y_p_e mode.

     When running in click-to-type mode, one user action _s_e_t_s the
     type-in  point  in  the window that you want to receive key-
     board 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 _r_e_s_t_o_r_e_s 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.



Sun Release 4.1   Last change: 21 December 1987                 1






SWIN(1)                  USER COMMANDS                    SWIN(1)



     -h   Print out a help message  that  briefly  describes  the
          options to swin.

     -m   Run in keyboard-follows-mouse mode.

     -s _e_v_e_n_t _v_a_l_u_e _s_h_i_f_t__s_t_a_t_e
          Set the user action that sets  the  type-in  point  and
          sets  the  keyboard input window.  The _e_v_e_n_t 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

          _d_e_c_i_m_a_l__n_u_m_b_e_r
               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 char-
               acters are OK, normally unused SHIFT keys are OK).

          _v_a_l_u_e identifies the transition of the _e_v_e_n_t and is one
          of:

          ENTER
               the  pointer   entering   a   window   (use   with
               LOC_WINENTER)

          DOWN the button associated with _e_v_e_n_t went down

          UP   the button associated with _e_v_e_n_t  went  up  (avoid
               this)

          The _s_h_i_f_t__s_t_a_t_e identifies the state of the SHIFT  keys
          at  the  time of the _e_v_e_n_t/_v_a_l_u_e pair in order for that
          pair to be used to control the keyboard  input  window.
          The _s_h_i_f_t__s_t_a_t_e 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



Sun Release 4.1   Last change: 21 December 1987                 2






SWIN(1)                  USER COMMANDS                    SWIN(1)



               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 _e_v_e_n_t _v_a_l_u_e _s_h_i_f_t__s_t_a_t_e
          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 _s_e_c_o_n_d_s
          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  _s_e_c_o_n_d_s  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)

     _S_u_n_V_i_e_w _U_s_e_r'_s _G_u_i_d_e

DIAGNOSTICS
     swin not passed parent window in environment
          swin does not work unless SunView is started already.






Sun Release 4.1   Last change: 21 December 1987                 3






SWIN(1)                  USER COMMANDS                    SWIN(1)



BUGS
     swin gets you no help in preventing you from  specifying  -r
     or -s parameters that are not sensible.




















































Sun Release 4.1   Last change: 21 December 1987                 4



