<commit_before>var Edge = Edge || {};

Edge.Keyboard = function(game) {
    var self = this;

    self.ignoredKeys = [Edge.KEY_F5]; // Keys to be send to the Browser.
    self.ignoreInput = false;

    game.canvas.tabIndex = 1; // Force canvas to be a "focusable" object.
    game.canvas.style.outline = "none"; // Disable the focus outline.
    game.canvas.addEventListener("keydown", onKeyDown, false);
    game.canvas.addEventListener("keyup", onKeyUp, false);
    game.canvas.addEventListener("keypress", onKeyPress, false);
    game.canvas.focus();

    function onKeyDown(e)
    {
        if (!self.ignoreInput && self.ignoredKeys.indexOf(e.keyCode) === -1) {
            e.preventDefault();
            game.event("keyboard.keyDown", {keyCode: e.keyCode}, self);
            game.event("keyboard.keyDown" + e.keyCode,
                {keyCode: e.keyCode}, self);
            return false;
        }
        return true;
    }

    function onKeyUp(e)
    {
        if (!self.ignoreInput && self.ignoredKeys.indexOf(e.keyCode) === -1) {
            e.preventDefault();
            game.event("keyboard.keyUp", {keyCode: e.keyCode}, self);
            game.event("keyboard.keyUp" + e.keyCode,
                {keyCode: e.keyCode}, self);
            return false;
        }
    }

    function onKeyPress(e)
    {
        if (!self.ignoreInput && self.ignoredKeys.indexOf(e.keyCode) === -1) {
            e.preventDefault();
            game.event("keyboard.keyPress", {keyCode: e.keyCode}, self);
            game.event("keyboard.keyPress" + e.keyCode,
                {keyCode: e.keyCode}, self);
            return false;
        }
        return true;<commit_msg>Remove Keyboard.keyPress event<commit_after>var Edge = Edge || {};

Edge.Keyboard = function(game) {
    var self = this;

    // Keys to be send to the Browser.
    self.ignoredKeys = [Edge.KEY_F5, Edge.KEY_F12];

    // Disable keyboard events altogether.
    self.ignoreInput = false;

    game.canvas.tabIndex = 1; // Force canvas to be a "focusable" object.
    game.canvas.style.outline = "none"; // Disable the focus outline.
    game.canvas.addEventListener("keydown", onKeyDown, false);
    game.canvas.addEventListener("keyup", onKeyUp, false);
    game.canvas.focus();

    function onKeyDown(e)
    {
        if (!self.ignoreInput && self.ignoredKeys.indexOf(e.keyCode) === -1) {
            e.preventDefault();
            game.event("keyboard.keyDown", {keyCode: e.keyCode}, self);
            game.event("keyboard.keyDown" + e.keyCode,
                {keyCode: e.keyCode}, self);
            return false;
        }
        return true;
    }

    function onKeyUp(e)
    {
        if (!self.ignoreInput && self.ignoredKeys.indexOf(e.keyCode) === -1) {
            e.preventDefault();
            game.event("keyboard.keyUp", {keyCode: e.keyCode}, self);
            game.event("keyboard.keyUp" + e.keyCode,
                {keyCode: e.keyCode}, self);
            return false;
        }
{'fraction_non_alphanumeric': 0.1431451612903226, 'fraction_numerical': 0.003696236559139785, 'mean_word_length': 2.1976369495166486, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7412548', 'n_tokens_mistral': 927, 'n_tokens_neox': 910, 'n_words': 187}