Add keyboard shortcut 'S' for Shuffle

This commit is contained in:
Dieter Schlüter 2026-04-06 21:00:49 +02:00
commit e0a10cf92f

View file

@ -204,7 +204,7 @@
<div class="flex-1"></div>
<div class="text-center">
<h1 class="title-text font-bold tracking-tight" style="color: var(--c-text); text-shadow: 0 0 40px rgba(74,124,255,0.3);">
Sortier-Algorithmen <span style="font-size: 0.45em; font-weight: 400; opacity: 0.5; vertical-align: middle;">v0.2.12</span>
Sortier-Algorithmen <span style="font-size: 0.45em; font-weight: 400; opacity: 0.5; vertical-align: middle;">v0.2.13</span>
</h1>
<p class="text-muted text-sm mt-0.5">Interaktive Visualisierung mit schrittweiser Animation</p>
</div>
@ -336,7 +336,7 @@
</button>
<button id="btnShuffle"
class="flex items-center justify-center bg-surface2 border border-border text-muted rounded-lg py-2.5 text-sm font-medium hover:bg-accent hover:border-accent hover:text-white active:scale-95 transition-all min-h-[44px]"
aria-label="Mischen" title="Mischen (Fisher-Yates)">
aria-label="Mischen (S)" title="Mischen (S) — Tastatur: S">
<i data-lucide="shuffle" class="w-4 h-4"></i>
</button>
<button id="btnReset"
@ -2763,6 +2763,10 @@ document.addEventListener('keydown', function(e) {
e.preventDefault();
$btnTheme.click();
break;
case 's':
e.preventDefault();
$btnShuffle.click();
break;
}
});