feat(hotkeys): Migrate hotkeys to customization service and fix issues with overrides (#4777)

This commit is contained in:
Alireza authored and GitHub committed 2025-02-25 13:32:30 -05:00
1 parent 4559d39a91
commit 3e6913b097
39 files changed
+814 -1552

No files matched your search

+16 -1
View File
@@ -102,6 +102,22 @@ function modeFactory() {
'Crosshairs',
'MoreTools',
]);
customizationService.setCustomizations(
{
'ohif.hotkeyBindings': {
$push: [
{
commandName: 'undo',
label: 'Undo',
keys: ['ctrl+z'],
isEditable: true,
},
],
},
},
'mode'
);
},
onModeExit: ({ servicesManager }: withAppTypes) => {
const {
@@ -209,7 +225,6 @@ function modeFactory() {
// Don't store the hotkeys for basic-test-mode under the same key
// because they get customized by tests
name: 'basic-test-hotkeys',
hotkeys: [...hotkeys.defaults.hotkeyBindings],
},
};
}