/**
 * DevExtreme (esm/__internal/grids/grid_core/m_accessibility.js)
 * Version: 23.1.6 (build 23316-0110)
 * Build date: Sun Nov 12 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)
    })
};
