                 elem[0].select()
 
             if options.preventInvalidInput == true
-              
               elem.on 'keypress', (e) ->
-                if elem.val().length >= options.maxDigits
+                if invalidAction(elem, event, options)
                   e.preventDefault()
                   e.stopPropagation()
-                if (isNotDigit(e.which) && isNotControlKey(e.which))
-                  e.preventDefault()
-                  e.stopPropagation()
 
     }
 ]

    isControlKey = (which) ->
      controlKeys.indexOf(which) >= 0

    lostAComma = (initialCommaCount, elem) ->
      elem.val().replace(/\d/g,"").length < initialCommaCount

    gainedAComma = (initialCommaCount, elem) ->
      elem.val().replace(/\d/g,"").length > initialCommaCount

    hasMultipleDecimals = (val) ->
      val? && val.toString().split('.').length > 2


              # not updating unless value is longer than 4 digits including commas
              # still some issues moving the comma after input/delete
              # need to add support for delete/backspace if comma is present
              # need to exclude entry of zeroes in 
              if scope.rawScoreUpdating == false
                beginUpdate() unless elem.val().length >= options.maxDigits

