Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 18e86f3

Browse files
authored
Fix non-customizable keybindings not working as expected (#7855)
1 parent 9db59d7 commit 18e86f3

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/KeyBindingsDefaults.ts

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ import {
3030
KeyBindingAction,
3131
} from "./accessibility/KeyboardShortcuts";
3232

33-
export const getBindingsByCategory = (
34-
category: CategoryName,
35-
): KeyBinding[] => {
33+
export const getBindingsByCategory = (category: CategoryName): KeyBinding[] => {
3634
return CATEGORIES[category].settingNames.reduce((bindings, name) => {
3735
const value = getCustomizableShortcuts()[name]?.default;
3836
if (value) {
@@ -151,7 +149,16 @@ const roomBindings = (): KeyBinding[] => {
151149
};
152150

153151
const navigationBindings = (): KeyBinding[] => {
154-
return getBindingsByCategory(CategoryName.NAVIGATION);
152+
const bindings = getBindingsByCategory(CategoryName.NAVIGATION);
153+
154+
bindings.push({
155+
action: "KeyBinding.closeDialogOrContextMenu" as KeyBindingAction,
156+
keyCombo: {
157+
key: Key.ESCAPE,
158+
},
159+
});
160+
161+
return bindings;
155162
};
156163

157164
const labsBindings = (): KeyBinding[] => {

0 commit comments

Comments
 (0)