1) Fix the tabbed panel backward/forward shortcut for tabs. #6808

2) Remove shortcuts for the dialog tab backward/forward.
3) Used hotkeys.js in place of mousetrap for listening to keyboard shortcuts.
This commit is contained in:
Anil Sahoo
2024-02-09 16:33:30 +05:30
committed by GitHub
parent 9ad223c41c
commit 47b2bc8a83
12 changed files with 182 additions and 162 deletions

View File

@@ -116,6 +116,11 @@ export class LayoutDocker {
this.layoutObj.updateTab(panelId, null, true);
}
//it will navigate to nearest panel/tab
navigatePanel() {
this.layoutObj.navigateToPanel();
}
find(...args) {
return this.layoutObj?.find(...args);
}

View File

@@ -17,10 +17,13 @@ import pgAdmin from 'sources/pgadmin';
export function parseShortcutValue(obj) {
let shortcut = '';
if (!obj){
return null;
}
if (obj.alt) { shortcut += 'alt+'; }
if (obj.shift) { shortcut += 'shift+'; }
if (obj.control) { shortcut += 'ctrl+'; }
shortcut += obj.key.char.toLowerCase();
shortcut += obj?.key.char?.toLowerCase();
return shortcut;
}