@itwin/appui-abstract
Version:
iTwin.js UI abstractions
62 lines • 2.64 kB
JavaScript
/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
* @module Utilities
*/
/** Enumeration for Function Keys
* @public @deprecated in 4.3 - will not be removed until after 2026-06-13. Please use the `ts-key-enum` npm package or string literals.
*/
export var FunctionKey;
(function (FunctionKey) {
FunctionKey["F1"] = "F1";
FunctionKey["F2"] = "F2";
FunctionKey["F3"] = "F3";
FunctionKey["F4"] = "F4";
FunctionKey["F5"] = "F5";
FunctionKey["F6"] = "F6";
FunctionKey["F7"] = "F7";
FunctionKey["F8"] = "F8";
FunctionKey["F9"] = "F9";
FunctionKey["F10"] = "F10";
FunctionKey["F11"] = "F11";
FunctionKey["F12"] = "F12";
})(FunctionKey || (FunctionKey = {}));
/** Enumeration for Special Keys
* @public @deprecated in 4.3 - will not be removed until after 2026-06-13. Please use the `ts-key-enum` npm package or string literals.
*/
export var SpecialKey;
(function (SpecialKey) {
SpecialKey["Home"] = "Home";
SpecialKey["End"] = "End";
SpecialKey["PageUp"] = "PageUp";
SpecialKey["PageDown"] = "PageDown";
SpecialKey["Escape"] = "Escape";
SpecialKey["Delete"] = "Delete";
SpecialKey["Insert"] = "Insert";
SpecialKey["Tab"] = "Tab";
SpecialKey["ArrowLeft"] = "ArrowLeft";
SpecialKey["ArrowRight"] = "ArrowRight";
SpecialKey["ArrowUp"] = "ArrowUp";
SpecialKey["ArrowDown"] = "ArrowDown";
SpecialKey["Enter"] = "Enter";
// eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
SpecialKey["Return"] = "Enter";
SpecialKey["Space"] = " ";
SpecialKey["Backspace"] = "Backspace";
SpecialKey["Clear"] = "Clear";
SpecialKey["Divide"] = "Divide";
SpecialKey["Multiply"] = "Multiply";
SpecialKey["Subtract"] = "Subtract";
SpecialKey["Add"] = "Add";
SpecialKey["Decimal"] = "Decimal";
})(SpecialKey || (SpecialKey = {}));
/** Determines if a KeyboardEvent.key is an Arrow key
* @public @deprecated in 4.3 - will not be removed until after 2026-06-13. Please use a custom implementation moving forward.
*/
export function isArrowKey(key) {
// eslint-disable-next-line @typescript-eslint/no-deprecated
return (key === SpecialKey.ArrowLeft || key === SpecialKey.ArrowRight || key === SpecialKey.ArrowUp || key === SpecialKey.ArrowDown);
}
//# sourceMappingURL=KeyboardKey.js.map