<commit_before>'use strict';

const React = require('react');
const { createContainer } = require('sovereign');

const styles = require('./styles');
const transmissionStore = require('../../src/stores/transmission');
const { transmitInput } = require('../../src/actions/transmission');

class TransmitPane extends React.Component {

  handleKeyDown(event) {
    const { keyCode } = event.nativeEvent;
    if (keyCode < 32 || (keyCode > 127 && keyCode < 160)) {
      transmitInput(keyCode);
    }
  }

  handleKeyPress(event) {
    const { keyCode } = event.nativeEvent;
    if ((keyCode >= 32 && keyCode <= 127) ||
        (keyCode >= 160 && keyCode <= 255)) {
      transmitInput(keyCode);
    }<commit_msg>ignore ctrl keys on keydown<commit_after>'use strict';

const React = require('react');
const { createContainer } = require('sovereign');

const styles = require('./styles');
const transmissionStore = require('../../src/stores/transmission');
const { transmitInput } = require('../../src/actions/transmission');

const ignore = [16, 17, 18, 20];

class TransmitPane extends React.Component {

  handleKeyDown(event) {
    const { keyCode } = event.nativeEvent;

    if (ignore.indexOf(keyCode) > -1) {
      return;
    }

    if (keyCode < 32 || (keyCode > 127 && keyCode < 160)) {
      transmitInput(keyCode);
    }
  }

  handleKeyPress(event) {
    const { keyCode } = event.nativeEvent;

    if ((keyCode >= 32 && keyCode <= 127) ||
        (keyCode >= 160 && keyCode <= 255)) {
      transmitInput(keyCode);
    }
{'fraction_non_alphanumeric': 0.16546762589928057, 'fraction_numerical': 0.030739045127534337, 'mean_word_length': 3.3342776203966005, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 10, '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': '3199081', 'n_tokens_mistral': 505, 'n_tokens_neox': 453, 'n_words': 108}