"use strict";
/*---------------------------------------------------------------------------------------------
 * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
 * See LICENSE.md in the project root for license terms and full copyright notice.
 *--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
 * @module Tools
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.FrameworkToolAdmin = void 0;
const core_frontend_1 = require("@itwin/core-frontend");
const appui_abstract_1 = require("@itwin/appui-abstract");
const UiFramework_1 = require("../UiFramework");
/** UiFramework implementation of ToolAdmin
 * @alpha
 */
class FrameworkToolAdmin extends core_frontend_1.ToolAdmin {
    /** Process shortcut key events */
    async processShortcutKey(e, wentDown) {
        let handled = false;
        if (wentDown && !UiFramework_1.UiFramework.isContextMenuOpen) {
            if (UiFramework_1.UiFramework.keyboardShortcuts.isFocusOnHome &&
                e.key !== appui_abstract_1.SpecialKey.Escape) {
                UiFramework_1.UiFramework.keyboardShortcuts.processKey(e.key, e.altKey, e.ctrlKey, e.shiftKey);
                handled = true;
            }
        }
        return handled;
    }
}
exports.FrameworkToolAdmin = FrameworkToolAdmin;
//# sourceMappingURL=FrameworkToolAdmin.js.map