first commit

This commit is contained in:
Stefan Hacker
2026-04-03 09:38:48 +02:00
commit 37ad745546
47450 changed files with 3120798 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
define(["require", "exports", "./KeyCodes"], function (require, exports, KeyCodes_1) {
"use strict";
var _a;
Object.defineProperty(exports, "__esModule", { value: true });
exports.isDirectionalKeyCode = isDirectionalKeyCode;
exports.addDirectionalKeyCode = addDirectionalKeyCode;
exports.removeDirectionalKeyCode = removeDirectionalKeyCode;
var DirectionalKeyCodes = (_a = {},
_a[KeyCodes_1.KeyCodes.up] = 1,
_a[KeyCodes_1.KeyCodes.down] = 1,
_a[KeyCodes_1.KeyCodes.left] = 1,
_a[KeyCodes_1.KeyCodes.right] = 1,
_a[KeyCodes_1.KeyCodes.home] = 1,
_a[KeyCodes_1.KeyCodes.end] = 1,
_a[KeyCodes_1.KeyCodes.tab] = 1,
_a[KeyCodes_1.KeyCodes.pageUp] = 1,
_a[KeyCodes_1.KeyCodes.pageDown] = 1,
_a);
/**
* Returns true if the keycode is a directional keyboard key.
*/
function isDirectionalKeyCode(which) {
return !!DirectionalKeyCodes[which];
}
/**
* Adds a keycode to the list of keys that, when pressed, should cause the focus outlines to be visible.
* This can be used to add global shortcut keys that directionally move from section to section within
* an app or between focus trap zones.
*/
function addDirectionalKeyCode(which) {
DirectionalKeyCodes[which] = 1;
}
/**
* Removes a keycode to the list of keys that, when pressed, should cause the focus outlines to be visible.
* This can be used to remove global shortcut keys that directionally move from section to section within
* an app or between focus trap zones.
*/
function removeDirectionalKeyCode(which) {
delete DirectionalKeyCodes[which];
}
});
//# sourceMappingURL=keyboard.js.map