modified: templates/quiz_buzzer_multiplayer.html
This commit is contained in:
@@ -264,9 +264,11 @@
|
|||||||
{ id: 4, name: teamNames[3] || 'Spieler 4', score: {{ player_scores[3] if player_scores else 0 }} }
|
{ id: 4, name: teamNames[3] || 'Spieler 4', score: {{ player_scores[3] if player_scores else 0 }} }
|
||||||
];
|
];
|
||||||
|
|
||||||
// Leertaste zum Starten und Buzzern
|
// Leertaste zum Starten/Buzzern, aber nicht in Eingabefeldern
|
||||||
document.addEventListener('keydown', function(e) {
|
document.addEventListener('keydown', function(e) {
|
||||||
if (e.code === 'Space') {
|
const active = document.activeElement;
|
||||||
|
const isInput = active && (active.tagName === 'INPUT' || active.tagName === 'TEXTAREA');
|
||||||
|
if (e.code === 'Space' && !isInput) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if (!gameStarted) {
|
if (!gameStarted) {
|
||||||
startGame();
|
startGame();
|
||||||
|
|||||||
Reference in New Issue
Block a user