Skip to main content

beforeKeyDown

fires before the user is pressing a shortcut key

beforeKeyDown: (event: Event) => boolean | void;

Parameters:

The callback of the event is called with the following parameters:

  • event: Event - a native KeyboardEvent object

Returns:

Return false to prevent pressing a shortcut key; otherwise, true.

Example

grid.events.on("beforeKeyDown", (event) => {
// your logic here
// return false;
});

Related sample: Grid. Events

The event fires when a cell of Grid has a keyboard focus.

Change log:

added in v6.4