close tab with confirmation on double ctrl+W

This commit is contained in:
SPRINX0\prochazka
2025-04-28 16:45:21 +02:00
parent 5f03340454
commit 0305a5dcef
4 changed files with 28 additions and 8 deletions

View File

@@ -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);