title: Handsontable - how to disable ENTER key in checkbox
body: <p>I want to use <strong>HandsOnTable</strong> (btw: excellent tool) for tabular data entry, with many numbers, so therefore need numeric keypad support. This means especially, that the ENTER key should behave like the TAB key, i.e. when pressed goto the next cell in the same row or at row end goto the first cell of the next row.</p>
  
  <pre><code>autoWrapRow: true
  </code></pre>
  
  <p>makes all this easily happen for the TAB key</p>
  
  <pre><code>enterMoves: function () {
      var maxCol = hot.getCellMeta(0, 0).columns.length-1
      if(hot.getSelected()[1] &gt;= maxCol) {
          return {row: 1, col: -maxCol}
      } else {
          return {row: 0, col: 1}
      }
  }
  </code></pre>
  
  <p>makes this happen for the ENTER key</p>
  
  <p>So far, so good - unfortunately I have also <strong>checkbox</strong> fields in the row.
  And here, the behavior is different:
  every ENTER toggles the checkbox but does not close the cell and move.
  So the data entry hangs in the checkbox until moved by TAB or mouseclick.</p>
  
  <p>I tried to fix this with:</p>
  
  <pre><code>beforeKeyDown: function (e) {
      var sel = hot.getSelected();
      var typ = hot.getCellMeta(sel[0], sel[1]).type;
      if (e.keyCode === 13 &amp;&amp; typ == 'checkbox') {
          e.stopImmediatePropagation();
      }
  }
  </code></pre>
  
  <p>But this does't work, i.e. same behavior as without the beforeKeyDown function.</p>
  
  <p>See also <a href="http://jsfiddle.net/utjwuy6L" rel="nofollow">jsFiddle</a></p>
  
  <p>Within handsontable.full.js (0.20.2) line 7070 there is only</p>
  
  <pre><code>beginEditing: function() {
      var checkbox = this.TD.querySelector('input[type="checkbox"]');
      if (!hasClass(checkbox, 'htBadValue')) {
          checkbox.click();
      }
  }
  </code></pre>
  
  <p>so toggling the checkbox independent which key was pressed, so I see no way modifying the checkboxEditor.
  It seems to be EditorManager functionality, deciding that a TAB is not passed to the editor but an ENTER is. EditorManager is not accessible for programming. Handsontable docs describe beforeKeyDown as the only way to influence EditorManager. But how in this case?</p>
  
  <pre><code>    cbEditor = hot.getCellEditor(sel[0], sel[1]);
      cbEditor.prototype.close();
  //  or
      cbEditor.prototype.discardEditor();
  </code></pre>
  
  <p>are not the solution. Custom renderer might be an idea, as there is the function onBeforeKeyDown handling SPACE, ENTER, DELETE, BACKSPACE.</p>
  
  <p>So I tried a way via selectCell:</p>
  
  <pre><code>    beforeKeyDown: function(e) {
        var sel = hot.getSelected();
        var typ = hot.getCellMeta(sel[0], sel[1]).type;
        if (e.keyCode === 13 &amp;&amp; typ == 'checkbox') {
  //        e.stopImmediatePropagation();
  //        seams to be not necessary - no effect
          var row = sel[0];
          var col = sel[1] + 1;
          if (col &gt;= hot.getCellMeta(0, 0).columns.length) {
            row += 1;
            col = 0;
          }
          hot.selectCell(row, col);
        }
      }
  </code></pre>
  
  <p>This works so far, is somewhat dirty (implementing the row wrap twice) but still has a minor bug:
  If the checkbox is in the last column and nothing entered in the row, ENTER toggles but moves to the next row.</p>
  
  <p>More under <a href="http://jsfiddle.net/zexybmm3/" rel="nofollow">jsFiddle</a></p>
  
  <p>I would appreciate any further ideas ...</p>