diff --git a/static/js/commands-filters.js b/static/js/commands-filters.js index 0c76387a8..aed6f0d1e 100644 --- a/static/js/commands-filters.js +++ b/static/js/commands-filters.js @@ -43,6 +43,21 @@ const FILTERS = { } }; +nameFilter = FILTERS.name.element +nameFilter.addEventListener('keydown', function(event) { + switch (event.key) { + case "Enter": + visible_commands = document.querySelectorAll("article.flex.flex-col.gap-2.transition.relative:not([style='display: none;'])") + if (visible_commands.length == 1) { + event.preventDefault(); + command_href = visible_commands[0].getElementsByTagName("a")[0].href + window.location.assign(command_href) + }; + default: + return; + } +}); + const hiddenCards = []; function setDisabledVersions(value) {