/**
 * DevExtreme (esm/__internal/grids/grid_core/module_accessibility.js)
 * Version: 22.2.6 (build 23123-0308)
 * Build date: Wed May 03 2023
 *
 * Copyright (c) 2012 - 2023 Developer Express Inc. ALL RIGHTS RESERVED
 * Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
 */
import * as accessibility from "../../../ui/shared/accessibility";
export var registerKeyboardAction = function(viewName, instance, $element, selector, action) {
    var keyboardController = instance.getController("keyboardNavigation");
    if (instance.option("useLegacyKeyboardNavigation") || keyboardController && !keyboardController.isKeyboardEnabled()) {
        return
    }
    instance.createAction("onKeyDown");
    accessibility.registerKeyboardAction(viewName, instance, $element, selector, action, args => {
        instance.executeAction("onKeyDown", args)
    })
};
