logDiv.textContent += `[${timestamp}] ${message}\n`;
                console.log(message);
            }

            function parseKeyPress(buffer) {
                let location = null;
                let analogValue = null;

                let offset = 0;
                while (offset < buffer.length) {
                    const tag = buffer[offset];
                    const fieldNum = tag >> 3;
                    const wireType = tag & 0x7;
                    offset++;

                    switch (