# Clear NumericTextBox value on pressing ESC key

## Environment

<table>
    <tbody>
	    <tr>
	    	<td>Product Version</td>
	    	<td>5.13.1</td>
	    </tr>
	    <tr>
	    	<td>Product</td>
	    	<td>Progress® KendoReact NumericTextBox</td>
	    </tr>
    </tbody>
</table>

## Description

I want to add custom logic to the NumericTextBox for clearing the value when the ESC key is pressed.

## Solution

Within React.useEffect, after the initialization of the component, add event listener to the input element of the NumericTextBox and set the value to "null" if the keyCode is "27".

Following is an example demonstrating this approach:

[Demo Source](https://demos.telerik.com/kendo-react-ui/knowledge-base/inputs/numerictextbox-clear-value-on-esc-key/source.txt)
