<!doctype html>
<meta charset=utf-8>
<head>
    <title>Test Keys</title>
    <script>
        var allEvents = {events: []};
        function displayMessage(message) {
            document.getElementById("events").innerHTML = "<p>" + message + "</p>";
        }

        function appendMessage(message) {
            document.getElementById("events").innerHTML += "<p>" + message + "</p>";
        }

        /**
         * Escape |key| if it's in a surrogate-half character range.
         *
         * Example: 