Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

Add keyboard shortcut to trigger hero button with Enter key

Maximilian Rooscd65c694847a
diff --git a/docs/templates/index.html b/docs/templates/index.html
index 4afd7c510..a3b005af6 100644
--- a/docs/templates/index.html
+++ b/docs/templates/index.html
@@ -67,6 +67,13 @@
</a>
</div>
</section>
+<script>
+ document.addEventListener('keydown', function(e) {
+ if (e.key === 'Enter' && !e.target.matches('input, textarea, [contenteditable]')) {
+ document.querySelector('.hero .button').click();
+ }
+ }, {once: true});
+</script>
<img class="hero-image" src="{{ get_url(path='logo.png') }}" srcset="{{ get_url(path='logo.png') }} 1x, {{ get_url(path='[email protected]') }} 2x" alt="Worktrunk logo" decoding="sync" fetchpriority="high">
{% endblock hero %}