mirror of
https://github.com/dbgate/dbgate
synced 2024-11-21 23:39:46 +00:00
fix: Mac - shortcut for select all
This commit is contained in:
parent
aa7d91f2c5
commit
f0fc50097b
@ -229,6 +229,9 @@ ipcMain.on('window-action', async (event, arg) => {
|
||||
case 'paste':
|
||||
mainWindow.webContents.paste();
|
||||
break;
|
||||
case 'selectAll':
|
||||
mainWindow.webContents.selectAll();
|
||||
break;
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -48,6 +48,7 @@ module.exports = ({ editMenu }) => [
|
||||
{ command: 'edit.cut' },
|
||||
{ command: 'edit.copy' },
|
||||
{ command: 'edit.paste' },
|
||||
{ command: 'edit.selectAll' },
|
||||
],
|
||||
}
|
||||
: null,
|
||||
|
@ -835,6 +835,16 @@ registerCommand({
|
||||
onClick: () => getElectron().send('window-action', 'paste'),
|
||||
});
|
||||
|
||||
registerCommand({
|
||||
id: 'edit.selectAll',
|
||||
category: 'Edit',
|
||||
name: 'Select All',
|
||||
keyText: 'CtrlOrCommand+A',
|
||||
systemCommand: true,
|
||||
testEnabled: () => getElectron() != null,
|
||||
onClick: () => getElectron().send('window-action', 'selectAll'),
|
||||
});
|
||||
|
||||
const electron = getElectron();
|
||||
if (electron) {
|
||||
electron.addEventListener('run-command', (e, commandId) => runCommand(commandId));
|
||||
|
Loading…
Reference in New Issue
Block a user