<commit_before>'use strict'

var Emitter = require('vigour-js/lib/emitter')
exports.inject = require('./')

var map = {
  // left
  37: 'arrowleft',
  4: 'arrowleft', // samsung

  // right
  39: 'arrowright',
  5: 'right', // samsung

  // up
  38: 'arrowup',
  29460: 'arrowup', // samsung

  // down
  40: 'arrowdown',
  29461: 'arrowdown', // samsung

  // back
  8: 'back',
  88: 'back', // samsung
  1537: 'back', // lg web os
  10009: 'back', // tizen os

  // menu / escape
  27: 'menu',
  75: 'menu',

  // enter
  13: 'enter',
  29443: 'enter',

  // rewind
  227: 'rewind',

  // play
  179: 'playbtn',

  // forward
  228: 'forward',

  // space
  32: 'space'
}

var keyEmitter = new Emitter({
  define: {
    generateConstructor: function () {
      return function DerivedEmitter (val, ev, parent, key) {
        if (parent) {
          let set = {}
          set[key] = function (e, event) {
            if (key === map[e.keyCode]) {
              e.preventDefault()
              this.emit(key, e, event)
            }
          }
          parent.setKey('keydown', set, ev)
        }
        return Emitter.apply(this, arguments)
      }
    }
  }
})

var properties = {}
for (var i in map) {
  var type = map[i]
  if (!properties[type]) {
    properties[type] = keyEmitter
  }
}

exports.on = {
  properties: properties
}
<commit_msg>remove prevent<commit_after>'use strict'

var Emitter = require('vigour-js/lib/emitter')
exports.inject = require('./')

var map = {
  // left
  37: 'arrowleft',
  4: 'arrowleft', // samsung

  // right
  39: 'arrowright',
  5: 'right', // samsung

  // up
  38: 'arrowup',
  29460: 'arrowup', // samsung

  // down
  40: 'arrowdown',
  29461: 'arrowdown', // samsung

  // back
  8: 'back',
  88: 'back', // samsung
  1537: 'back', // lg web os
  10009: 'back', // tizen os

  // menu / escape
  27: 'menu',
  75: 'menu',

  // enter
  13: 'enter',
  29443: 'enter',

  // rewind
  227: 'rewind',

  // play
  179: 'playbtn',

  // forward
  228: 'forward',

  // space
  32: 'space'
}

var keyEmitter = new Emitter({
  define: {
    generateConstructor: function () {
      return function DerivedEmitter (val, ev, parent, key) {
        if (parent) {
          let set = {}
          set[key] = function (e, event) {
            if (key === map[e.keyCode]) {
              this.emit(key, e, event)
            }
          }
          parent.setKey('keydown', set, ev)
        }
        return Emitter.apply(this, arguments)
      }
    }
  }
})

var properties = {}
for (var i in map) {
  var type = map[i]
  if (!properties[type]) {
    properties[type] = keyEmitter
  }
}

exports.on = {
  properties: properties
}

{'fraction_non_alphanumeric': 0.17028443113772454, 'fraction_numerical': 0.040419161676646706, 'mean_word_length': 1.9832589285714286, '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': '3168836', 'n_tokens_mistral': 1036, 'n_tokens_neox': 966, 'n_words': 246}