Keyboard Interaction

With the keyboard navigation enabled in the NumericTextbox control, you can control the actions of the NumericTextbox with the provided shortcut keys. Almost all the NumericTextbox actions that are done through mouse can be controlled with shortcut keys.

The various keyboard shortcuts available within the NumericTextbox control are as follows.

Shortcut Key Description
{ Access key } + j Focuses the control
Up Increments the value
Down Decrements the value
Tab Focuses the next element

Configuring Keyboard Navigation

The following steps explain the implementation of the keyboard interaction in the NumericTextbox.

Add the following code example in your ASPX page to render the NumericTextbox control.

  • html
  • <ej:NumericTextBox ID="numeric" Value="11"  runat="server" ></ej:NumericTextBox>

    Add the following code example in your script section

  • js
  • $(document).on("keydown", function (e) 
    
    {
    
        if (e.altKey && e.keyCode === 74) 
    
        { // j- key code.
    
              $("#<%=numeric.ClientID%>").siblings(".e-input").focus();
    
        }
    
    });

    Run the sample and press Access key + j key to focus the NumericTextbox control. Perform provided functionality by using the keyboard shortcuts.

    C:/Users/giftline.jebamani/Desktop/p.png