@@ -67,7 +67,7 @@ function initHotKeys() {
67 var bodyEl = document.body;
67 var bodyEl = document.body;
68 var searchInput = document.getElementById('search');
68 var searchInput = document.getElementById('search');
70− document.addEventListener('keyup', function (event) {
70+ document.addEventListener('keydown', function (event) {
71 if (event.defaultPrevented) {
71 if (event.defaultPrevented) {
@@ -77,6 +77,16 @@ function initHotKeys() {
77 // ESC to close search window
77 // ESC to close search window
78 if (key === 'Escape' || key === 'Esc' || key === 27) {
78 if (key === 'Escape' || key === 'Esc' || key === 27) {
79 document.body.classList.remove('has-active-search-window');
79 document.body.classList.remove('has-active-search-window');
83+ // / to close toggle window
84+ if (key === '/' || key === 'Period' || key === 58) {
85+ event.preventDefault();
86+ document.body.classList.toggle('has-active-search-window');
87+ if (bodyEl.classList.contains('has-active-search-window')) {
82 //when search is active TAB puts search input into focus
92 //when search is active TAB puts search input into focus
@@ -88,8 +98,6 @@ function initHotKeys() {
94 // search functionality
102 // search functionality
@@ -303,7 +311,7 @@ function initSearch() {
303 searchResultsHeader.value = "";
311 searchResultsHeader.value = "";
305 var term = searchInput.value.trim();
313 var term = searchInput.value.trim();
308 //removed to fix: a state where there’s a valid search term, but no results
316 //removed to fix: a state where there’s a valid search term, but no results