Hotkeys¶
To simplify the work with the Universe system, you can use keyboard shortcuts on several browser tabs.
UEGlobalHotkey provides the ability to connect hotkey combination handlers
UEGlobalHotkey
import {UeModuleBase} from '../../userexit/type/UeModuleBase';
import {ComponentType} from 'react';
export type UEGlobalHotkey = UeModuleBase & {
default: {
component: ComponentType<{}>;
meta: {};
};
}
Realisation:
import {IdSearch} from './hotkey/IdSearch';
import {SystemTools} from './hotkey/SystemTools';
import {UEList} from '@unidata/types';
export enum UrlRoutes {
MainPage = '/main', // Main page with widgets
SearchPage = '/search', // Main route of the search page
SearchTable = '/search/:namespace?/:entityName?', // A table with the results
DataView = '/dataviewlight/:namespace/:entityName/:etalonId', // Page for viewing data card
Compare = '/data/compare/:entityName', // Page for viewing compare table
History = '/data/history/:namespace/:entityName/:etalonId' // Page for viewing record history
}
const hotkeyDefaults = {
type: UEList.GlobalHotkey,
active: true,
system: false,
resolver: () => true,
meta: {}
};
export const hotkeys = [
{
'default': {
moduleId: 'idSearch',
component: IdSearch,
...hotkeyDefaults
}
},
{
'default': {
moduleId: 'systemTools',
component: SystemTools,
...hotkeyDefaults
}
}
];