2022-07-13 18:25:42 +02:00
|
|
|
interface ShortcutRecord {
|
|
|
|
event: string;
|
2022-07-14 19:30:34 +02:00
|
|
|
keys: Electron.Accelerator[];
|
2022-07-13 18:25:42 +02:00
|
|
|
description: string;
|
2022-07-21 11:01:10 +02:00
|
|
|
os: NodeJS.Platform[];
|
2022-07-13 18:25:42 +02:00
|
|
|
}
|
|
|
|
|
2022-07-14 19:30:34 +02:00
|
|
|
const shortcuts: ShortcutRecord[] = [
|
|
|
|
{
|
|
|
|
event: 'open-new-tab',
|
|
|
|
keys: ['CommandOrControl+T'],
|
2022-07-21 11:01:10 +02:00
|
|
|
description: 'Open a new query tab',
|
|
|
|
os: ['darwin', 'linux', 'win32']
|
2022-07-14 19:30:34 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
event: 'close-tab',
|
|
|
|
keys: ['CommandOrControl+W'],
|
2022-07-21 11:01:10 +02:00
|
|
|
description: 'Close tab',
|
|
|
|
os: ['darwin', 'linux', 'win32']
|
2022-07-14 19:30:34 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
event: 'next-tab',
|
|
|
|
keys: ['Alt+CommandOrControl+Right', 'CommandOrControl+PageDown'],
|
2022-07-21 11:01:10 +02:00
|
|
|
description: 'Next tab',
|
|
|
|
os: ['darwin', 'win32']
|
2022-07-14 19:30:34 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
event: 'prev-tab',
|
|
|
|
keys: ['Alt+CommandOrControl+Left', 'CommandOrControl+PageUp'],
|
2022-07-21 11:01:10 +02:00
|
|
|
description: 'Previous tab',
|
|
|
|
os: ['darwin', 'win32']
|
|
|
|
},
|
|
|
|
{
|
|
|
|
event: 'next-tab',
|
|
|
|
keys: ['CommandOrControl+PageDown'],
|
|
|
|
description: 'Next tab',
|
|
|
|
os: ['linux']
|
|
|
|
},
|
|
|
|
{
|
|
|
|
event: 'prev-tab',
|
|
|
|
keys: ['CommandOrControl+PageUp'],
|
|
|
|
description: 'Previous tab',
|
|
|
|
os: ['linux']
|
2022-07-14 19:30:34 +02:00
|
|
|
},
|
2022-07-13 18:25:42 +02:00
|
|
|
{
|
|
|
|
event: 'open-connections-modal',
|
2022-07-14 19:30:34 +02:00
|
|
|
keys: ['Shift+CommandOrControl+Space'],
|
2022-07-21 11:01:10 +02:00
|
|
|
description: 'Show all connections',
|
|
|
|
os: ['darwin', 'linux', 'win32']
|
2022-07-16 12:01:37 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
event: 'toggle-console',
|
|
|
|
keys: ['CommandOrControl+F12', 'CommandOrControl+`'],
|
2022-07-21 11:01:10 +02:00
|
|
|
description: 'Toggle console',
|
|
|
|
os: ['darwin', 'linux', 'win32']
|
2022-07-13 18:25:42 +02:00
|
|
|
}
|
|
|
|
];
|
2022-07-14 19:30:34 +02:00
|
|
|
|
|
|
|
for (let i = 1; i <= 9; i++) {
|
|
|
|
shortcuts.push(
|
|
|
|
{
|
|
|
|
event: `select-tab-${i}`,
|
|
|
|
keys: [`CommandOrControl+${i}`],
|
2022-07-21 11:01:10 +02:00
|
|
|
description: `Select tab number ${i}`,
|
|
|
|
os: ['darwin', 'linux', 'win32']
|
2022-07-14 19:30:34 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
export { shortcuts };
|