# Edit boxes in R TclTk

The following example illustrates how to use an edit box in a Tk window. Note that the Enter/Return key is mapped to have the same effect as clicking the OK button with the mouse. A common mistake is to assume that the <Enter> event corresponds to the Enter key being pressed, but this would actually mean that the user is entering data into the Tk widget (in this case the edit box). So for this example, <Return> is the correct event to capture.

Change name and click OK