# Handling text input

You can use HTML tags to create text boxes in widgets. The text boxes are mapped to an S60 text box component. The S60 platform interprets the key and character event and determines whether the input is given using the basic mobile device keyboard or a full keyboard and with or without predictive text input. To handle user input in text boxes, examine the textual input value.

Figure: Text input field in a widget

When a text box is in editing mode, key events are absorbed by the widget engine. Therefore, widgets cannot instantly receive key events to detect which character users enter to the text box. This means that users must select the text box before they can type in it. You can use JavaScript to write a key map engine that detects key events to allow immediate input. This allows you to develop an instant search function where characters are detected immediately after users types them into the search field, for example. For an example of a key map engine, see WRT NumKeyTranslator Widget on the Forum Nokia Wiki.

### To create text or input dialogs in your widget

Use the `<textarea>` or `<input type="text">` tag in the HTML file, for example.