mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-23 16:16:02 +00:00
close tab with confirmation on double ctrl+W
This commit is contained in:
@@ -2,15 +2,10 @@
|
||||
import { commandsCustomized, visibleCommandPalette } from '../stores';
|
||||
import { get } from 'svelte/store';
|
||||
import { runGroupCommand } from './runCommand';
|
||||
import { isMac, resolveKeyText } from '../utility/common';
|
||||
import { getKeyTextFromEvent, isMac, resolveKeyText } from '../utility/common';
|
||||
|
||||
export function handleCommandKeyDown(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;
|
||||
const keyText = getKeyTextFromEvent(e);
|
||||
|
||||
// console.log('keyText', keyText);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user