feat(shortcuts): suppress Shift+Esc browser task manager
This commit is contained in:
1 parent
b498b1e63a
commit
37d5ea0bd4
4 files changed
+49
-1
No files matched your search
+14
@@ -4,6 +4,7 @@ import {
|
||||
eventToShortcut,
|
||||
handleTabHistoryNavigationShortcut,
|
||||
isBrowserReloadShortcut,
|
||||
isBrowserTaskManagerShortcut,
|
||||
isCancelSearchShortcut,
|
||||
isCloseOtherTabsShortcut,
|
||||
isCloseTabShortcut,
|
||||
@@ -368,6 +369,19 @@ test("detects browser reload shortcuts for desktop suppression", () => {
|
||||
assert.equal(isBrowserReloadShortcut({ key: "r", ctrlKey: true, isComposing: true }), false);
|
||||
});
|
||||
|
||||
test("detects browser task manager shortcut (Shift+Escape) for suppression", () => {
|
||||
assert.equal(isBrowserTaskManagerShortcut({ key: "Escape", shiftKey: true }), true);
|
||||
assert.equal(isBrowserTaskManagerShortcut({ key: "Esc", shiftKey: true }), true);
|
||||
assert.equal(isBrowserTaskManagerShortcut({ code: "Escape", shiftKey: true, key: "Unidentified" }), true);
|
||||
assert.equal(isBrowserTaskManagerShortcut({ key: "Escape" }), false);
|
||||
assert.equal(isBrowserTaskManagerShortcut({ key: "Escape", shiftKey: false }), false);
|
||||
assert.equal(isBrowserTaskManagerShortcut({ key: "Escape", shiftKey: true, ctrlKey: true }), false);
|
||||
assert.equal(isBrowserTaskManagerShortcut({ key: "Escape", shiftKey: true, metaKey: true }), false);
|
||||
assert.equal(isBrowserTaskManagerShortcut({ key: "Escape", shiftKey: true, altKey: true }), false);
|
||||
assert.equal(isBrowserTaskManagerShortcut({ key: "Escape", shiftKey: true, isComposing: true }), false);
|
||||
assert.equal(isBrowserTaskManagerShortcut({ key: "Tab", shiftKey: true }), false);
|
||||
});
|
||||
|
||||
test("matches Mod-R without shift or alt for scoped refresh and replace", () => {
|
||||
assert.equal(isModRShortcut({ key: "r", ctrlKey: true }), true);
|
||||
assert.equal(isModRShortcut({ key: "R", metaKey: true }), true);
|
||||
|
||||
Reference in new issue
Block a user