createKeyPressEvent {iSPlot}R Documentation

Create callbacks for a key press event


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.




w the gtk window


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


Elizabeth Whalen

See Also

createView, setKeyValToAction


  if (interactive())
    # should load data through Open Data or Open File under the File menu
    # 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

[Package iSPlot version 1.0.3 Index]