mirror of
https://github.com/Fabio286/antares.git
synced 2025-06-05 21:59:22 +02:00
50 lines
1.1 KiB
TypeScript
50 lines
1.1 KiB
TypeScript
interface ShortcutRecord {
|
|
event: string;
|
|
keys: Electron.Accelerator[];
|
|
description: string;
|
|
}
|
|
|
|
const shortcuts: ShortcutRecord[] = [
|
|
{
|
|
event: 'open-new-tab',
|
|
keys: ['CommandOrControl+T'],
|
|
description: 'Open a new query tab'
|
|
},
|
|
{
|
|
event: 'close-tab',
|
|
keys: ['CommandOrControl+W'],
|
|
description: 'Close tab'
|
|
},
|
|
{
|
|
event: 'next-tab',
|
|
keys: ['Alt+CommandOrControl+Right', 'CommandOrControl+PageDown'],
|
|
description: 'Next tab'
|
|
},
|
|
{
|
|
event: 'prev-tab',
|
|
keys: ['Alt+CommandOrControl+Left', 'CommandOrControl+PageUp'],
|
|
description: 'Previous tab'
|
|
},
|
|
{
|
|
event: 'open-connections-modal',
|
|
keys: ['Shift+CommandOrControl+Space'],
|
|
description: 'Show all connections'
|
|
},
|
|
{
|
|
event: 'toggle-console',
|
|
keys: ['CommandOrControl+F12', 'CommandOrControl+`'],
|
|
description: 'Toggle console'
|
|
}
|
|
];
|
|
|
|
for (let i = 1; i <= 9; i++) {
|
|
shortcuts.push(
|
|
{
|
|
event: `select-tab-${i}`,
|
|
keys: [`CommandOrControl+${i}`],
|
|
description: `Select tab number ${i}`
|
|
});
|
|
}
|
|
|
|
export { shortcuts };
|