addToKeyVals {iSPlot} | R Documentation

## Add values for the key press event

### Description

The addToKeyVals function will add to the keyVals variable stored in controlEnv. It is this variable, keyVals, that determines what key press events the Gtk windows will respond to. Thus, the keyVals variable will be different if the views are created through the command line functions or through the user interface.

### Usage

    addToKeyVals(text, action, ...)

### Arguments

`text` | the text that would be placed on the menu item label
`action` | the response should occur when the key press event occurs (this may either be a function name or the text used in updateControlWindow)
`...` | only used when the action corresponds to focusing on a view so this parameter will contain the window number of the view

### Details

If the control window is created, then there will be key press events for all menu items (this is done through two function calls, createMenuItem and createView). If the views are created through the command line functions, then there will be key press events for quitting and for setting the focus on a view (this is done through the functions createMenuItemVariables and createView).

### Author(s)

Elizabeth Whalen

### See Also

`addMenuItem`

### Examples

      if (interactive())
      {
        loadData("USArrests")
        setActiveMVC("USArrests")
        createSpreadsheet()
        # now while the spreadsheet is active, press Ctrl+Q and a window will
        # appear asking if you would like to quit
      }

[Package iSPlot version 1.12.0 Index]