diff --git a/index.html b/index.html index 3d4c71c..207b5eb 100644 --- a/index.html +++ b/index.html @@ -88,6 +88,15 @@ width: 100%; } + .btn-secondary { + background-color: #9ca3af; + color: white; + } + + .btn-secondary:hover { + background-color: #6b7280; + } + .btn-success { background-color: #16a34a; color: white; @@ -382,7 +391,7 @@
@@ -1068,6 +1077,15 @@ // don't intercept when modifier keys are pressed if (e.ctrlKey || e.altKey || e.metaKey) return; if (document.getElementById('gridScreen').style.display === 'none') return; + + if (e.key === 'Escape') { + e.preventDefault(); + const modal = document.getElementById('definitionModal'); + if (modal.classList.contains('show')) { + closeModal(); + } + return; + } // If modal is open, do not interact with grid via keyboard const modal = document.getElementById('definitionModal'); @@ -1202,6 +1220,8 @@ renderGrid(); } }); + +