 
     @props.onKeyDown?(e)
 
-  _handleKeyPress: (e) ->
-    if e.key.length is 1
-      {begin, end} = @_getSelection()
-      @_cursorPos = begin
-      bufferChanged = false
-
-      if begin isnt end
-        @_shiftLeft(begin, end)
-        bufferChanged = true
-
-      next = @_seekNext(@_cursorPos - 1)
-      if next < @props.mask.length && @_getPattern(next).test(e.key)
-        @_shiftRight(next)
-
-        @_buffer[next] = e.key
-        @_cursorPos = @_seekNext(next)
-        value = @_setValue @_buffer.join('')
-        @_callOnComplete value
-      else if bufferChanged
-        @_setValue @_buffer.join('')
-
-      e.preventDefault()
-
-    @props.onKeyPress?(e)
-
   _handleChange: (e) ->
     value = @_maskedValue e.target.value
     @_setValue value

React = window?.React || require 'react'
jsdiff = require 'diff'

assert = require('chai').assert

DEFAULT_TRANSLATIONS =
  '9': /\d/


    @_cursorPos = Math.max(begin, @_firstNonMaskIdx)

  _callOnComplete: (value) ->
    return unless @props.onComplete?
    for i in [0...@props.mask.length]
