mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
cmd+backspace for delete rows on mac
This commit is contained in:
parent
5315a549b0
commit
66da21804b
@ -12,6 +12,8 @@
|
||||
if (e.altKey) keyText += 'Alt+';
|
||||
keyText += e.key;
|
||||
|
||||
// console.log('keyText', keyText);
|
||||
|
||||
const commandsValue = get(commandsCustomized);
|
||||
let commandsFiltered: any = Object.values(commandsValue).filter(
|
||||
(x: any) =>
|
||||
|
@ -35,7 +35,7 @@
|
||||
category: 'Data grid',
|
||||
name: 'Delete selected rows',
|
||||
toolbarName: 'Delete row(s)',
|
||||
keyText: 'CtrlOrCommand+Delete',
|
||||
keyText: isMac() ? 'Command+Backspace' : 'CtrlOrCommand+Delete',
|
||||
icon: 'icon minus',
|
||||
testEnabled: () => getCurrentDataGrid()?.getGrider()?.editable,
|
||||
onClick: () => getCurrentDataGrid().deleteSelectedRows(),
|
||||
|
@ -53,7 +53,8 @@ export function formatKeyText(keyText: string): string {
|
||||
.replace('Shift+', '⇧ ')
|
||||
.replace('Alt+', '⌥ ')
|
||||
.replace('Command+', '⌘ ')
|
||||
.replace('Ctrl+', '⌃ ');
|
||||
.replace('Ctrl+', '⌃ ')
|
||||
.replace('Backspace', '⌫ ');
|
||||
}
|
||||
return keyText.replace('CtrlOrCommand+', 'Ctrl+');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user