createKeyPressEvent          package:iSPlot          R Documentation

_C_r_e_a_t_e _c_a_l_l_b_a_c_k_s _f_o_r _a _k_e_y _p_r_e_s_s _e_v_e_n_t

_D_e_s_c_r_i_p_t_i_o_n:

     createKeyPressEvent is used to add pseudo-accelerators to any gtk
     window.  Regardless of which gtk window is active, any gtk window
     should react as though the accelerators from the main menu still
     work. So if a view window is active, but the user types Ctrl-Q,
     the message box asking the user if they would like to quit should
     pop up, which is the same as what would happen if the control
     window was active.   Any gtk window when it is created should call
     this function so that all windows opened in iSPlot will react the
     same to key press events.

_U_s_a_g_e:

       createKeyPressEvent(w)

_A_r_g_u_m_e_n_t_s:

       w: the gtk window 

_D_e_t_a_i_l_s:

     The callbacks for the key press events are the same as the
     accelerators for the main menu on the control window.

_A_u_t_h_o_r(_s):

     Elizabeth Whalen

_S_e_e _A_l_s_o:

     'createView', 'setKeyValToAction'

_E_x_a_m_p_l_e_s:

       if (interactive())
       {
         createControlWindow()
         # should load data through Open Data or Open File under the File menu
         data(USArrests)
         loadDFData(USArrests,"USArrests")
         # viewing the data should occur through View Data under the Display menu
         # createDataSpreadsheet will call createKeyPressEvent
         createView(type = "spreadView", dataName = "USArrests")
      
         # now you can type Ctrl-Q while the spreadsheet is active and the 
         # pop-up window for quitting should appear
       }

