Add this plugin to the front matter of a .qmd file or _quarto.yaml, as shown below.
Open the html rendered and the speaker view by pressing “S”
Press “Ctrl” on a window
The message will be displayed on a web browser console.


You can modify the code here to change what data is sent/received and how they are done.
// Process a received message on reveal-sync
if (data && data.namespace === 'reveal-sync') {
// Process your data received here
// ...
if (data.type == 'keepalive') {
if (currentSlideWindow !== event.source) {
currentSlideWindow = event.source;
}
} else {
console.log(`[${windowType}] 🎯 Received:`, data.type, 'from:', data.from);
}
}