Fix non-customizable keybindings not working as expected (#7855)
parent
9db59d75b9
commit
18e86f3bf8
|
@ -30,9 +30,7 @@ import {
|
||||||
KeyBindingAction,
|
KeyBindingAction,
|
||||||
} from "./accessibility/KeyboardShortcuts";
|
} from "./accessibility/KeyboardShortcuts";
|
||||||
|
|
||||||
export const getBindingsByCategory = (
|
export const getBindingsByCategory = (category: CategoryName): KeyBinding[] => {
|
||||||
category: CategoryName,
|
|
||||||
): KeyBinding[] => {
|
|
||||||
return CATEGORIES[category].settingNames.reduce((bindings, name) => {
|
return CATEGORIES[category].settingNames.reduce((bindings, name) => {
|
||||||
const value = getCustomizableShortcuts()[name]?.default;
|
const value = getCustomizableShortcuts()[name]?.default;
|
||||||
if (value) {
|
if (value) {
|
||||||
|
@ -151,7 +149,16 @@ const roomBindings = (): KeyBinding[] => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const navigationBindings = (): KeyBinding[] => {
|
const navigationBindings = (): KeyBinding[] => {
|
||||||
return getBindingsByCategory(CategoryName.NAVIGATION);
|
const bindings = getBindingsByCategory(CategoryName.NAVIGATION);
|
||||||
|
|
||||||
|
bindings.push({
|
||||||
|
action: "KeyBinding.closeDialogOrContextMenu" as KeyBindingAction,
|
||||||
|
keyCombo: {
|
||||||
|
key: Key.ESCAPE,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
return bindings;
|
||||||
};
|
};
|
||||||
|
|
||||||
const labsBindings = (): KeyBinding[] => {
|
const labsBindings = (): KeyBinding[] => {
|
||||||
|
|
Loading…
Reference in New Issue