Accept arrow up/down for slide navigation in the presenter view
CI / Deploy / PHP 8.5 (push) Successful in 1m36s
CI / Deploy / PHP 8.4 (push) Successful in 1m37s
CI / Deploy / test (push) Successful in 1s
CI / Deploy / deploy (push) Skipped

Presenter remotes often send ArrowUp/ArrowDown instead of left/right.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
gnilebeinandClaude Sonnet 5.5 committed 2026-11-21 11:37:37 +01:00
1 parent cad09163d9
commit bf9f86d24a
3 files changed
+7 -5

No files matched your search

+3 -1
View File
@@ -1643,7 +1643,7 @@
if ((event.key === ' ' || event.key === 'Enter') && event.target.closest('[data-comments]')) {
return; // activates the focused comment button, not the next slide
}
if (embedded && ['ArrowRight', 'ArrowLeft', 'PageUp', 'PageDown', ' ', 'p', 'P', 'f', 'F', 'q', 'Q'].indexOf(event.key) >= 0) {
if (embedded && ['ArrowRight', 'ArrowLeft', 'ArrowUp', 'ArrowDown', 'PageUp', 'PageDown', ' ', 'p', 'P', 'f', 'F', 'q', 'Q'].indexOf(event.key) >= 0) {
return; // slide navigation belongs to the surrounding presentation
}
switch (event.key) {
@@ -1652,12 +1652,14 @@
control(state && !state.slide && state.poll.isPaused ? 'resume' : 'stop');
break;
case 'ArrowRight':
case 'ArrowDown':
case 'PageDown':
case ' ':
event.preventDefault();
control('next');
break;
case 'ArrowLeft':
case 'ArrowUp':
case 'PageUp':
event.preventDefault();
control('prev');