     'keyup #settings-panes input:text, #settings-panes input:password': (e) -> @trigger 'inputChanged', e
     'keyup #name': 'onNameChange'
     'click #toggle-all-button': 'toggleEmailSubscriptions'
+    'keypress #settings-panes': 'onKeyPress'
 
   constructor: (options) ->
     @save =  _.debounce(@save, 200)

    $that = $(e.currentTarget)
    $that.val $that[0].checked

  enableSaveButton: ->
    $('#save-button', @$el).removeClass 'disabled'
    $('#save-button', @$el).removeAttr 'disabled'
    $('#save-button', @$el).text 'Save'

  disableSaveButton: ->
    $('#save-button', @$el).addClass 'disabled'
    $('#save-button', @$el).attr 'disabled', "true"
    $('#save-button', @$el).text 'No Changes'

  checkNameExists: =>
    name = $('#name', @$el).val()
    User.getUnconflictedName name, (newName) =>
      forms.clearFormAlerts(@$el)
      if name is newName

    @on 'checkboxToggled', @onToggle
    @on 'checkboxToggled', @onInputChanged
    @on 'inputChanged', @onInputChanged
    @on 'enterPressed', @onEnter

  onInputChanged: (e) ->
    return @enableSaveButton() unless e?.currentTarget
