diff --git a/src/pydata_sphinx_theme/assets/scripts/pydata-sphinx-theme.js b/src/pydata_sphinx_theme/assets/scripts/pydata-sphinx-theme.js index f7f444c1d..b0e65ab1d 100644 --- a/src/pydata_sphinx_theme/assets/scripts/pydata-sphinx-theme.js +++ b/src/pydata_sphinx_theme/assets/scripts/pydata-sphinx-theme.js @@ -245,7 +245,7 @@ var addEventListenerForSearchKeyboard = () => { ? event.metaKey && !event.ctrlKey : !event.metaKey && event.ctrlKey) && // Case-insensitive so the shortcut still works with caps lock - /k/i.test(event.key) + /^k$/i.test(event.key) ) { event.preventDefault(); toggleSearchField();