This commit is contained in:
Dobromir Popov
2025-11-22 15:25:57 +02:00
parent bccac9614d
commit 2f28fcc89a
7 changed files with 174 additions and 35 deletions

View File

@@ -101,6 +101,23 @@
if (typeof checkActiveTraining === 'function') {
checkActiveTraining();
}
// Keyboard shortcuts for chart maximization
document.addEventListener('keydown', function(e) {
// ESC key to exit maximized mode
if (e.key === 'Escape') {
const chartArea = document.querySelector('.chart-maximized');
if (chartArea) {
document.getElementById('maximize-btn').click();
}
}
// F key to toggle maximize (when not typing in input)
if (e.key === 'f' && !e.ctrlKey && !e.metaKey &&
!['INPUT', 'TEXTAREA', 'SELECT'].includes(document.activeElement.tagName)) {
document.getElementById('maximize-btn').click();
}
});
// Setup keyboard shortcuts
setupKeyboardShortcuts();