mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-22 08:46:00 +00:00
close tab with confirmation on double ctrl+W
This commit is contained in:
@@ -134,3 +134,13 @@ export async function switchCurrentDatabase(data) {
|
||||
currentDatabase.set(data);
|
||||
}
|
||||
}
|
||||
|
||||
export function getKeyTextFromEvent(e) {
|
||||
let keyText = '';
|
||||
if (e.ctrlKey) keyText += 'Ctrl+';
|
||||
if (e.metaKey) keyText += 'Command+';
|
||||
if (e.shiftKey) keyText += 'Shift+';
|
||||
if (e.altKey) keyText += 'Alt+';
|
||||
keyText += e.key;
|
||||
return keyText;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user