Keyboard Navigation

The entire Toolbar commands can be accessed through the keyboard by specifying the Keyboard Shortcut listed in the following table.

List of keyboard shortcuts

Keyboard Shortcut Function
Alt + j Focuses the control
UP Navigates up and left.
Down Navigates down and right.
Left Navigates up and left.
Right Navigates down and right.
Home Navigates to the starting item.
End Navigates to the ending item.
Enter Selects the focused item

The following code example illustrates shortcuts associated with the Toolbar items.

  • html
  • <!-- Refer Local Data section for style and data bound for toolbar item -->
  • js
  • /// <reference path="tsfiles/jquery.d.ts" />
    /// <reference path="tsfiles/ej.web.all.d.ts" />
    module ToolbarComponent {
        $(function () {
            // declaration
            var sample = new ej.Toolbar($("#toolbar"),{
                 width: "290px"
                  });
            //Control focus key
            $(document).on("keydown", function (e) {
                if (e.altKey && e.keyCode === 74) { // j- key code.
                    $("#toolbar").focus();
                }
            });
        });
    }