     stepKey: React.PropTypes.number
     goToStep: React.PropTypes.func
 
+  componentWillUnmount: ->
+    keymaster.deleteScope(KEYBINDING_SCOPE)
+
+  componentWillMount: ->
+    keymaster(@props.direction,  KEYBINDING_SCOPE, @arrowClicked)
+    keymaster.setScope(KEYBINDING_SCOPE)
 
   transition: ->
     { stepId, stepKey, direction, goToStep } = @props

React = require 'react'
{TaskStore} = require '../../../flux/task'
{TaskStepStore, TaskStepActions} = require '../../../flux/task-step'

module.exports = React.createClass
  propTypes:

  arrowClicked: ->
    { stepId, direction } = @props

    if (direction is 'right' and stepId and not TaskStepStore.get(stepId).is_completed)
      TaskStepStore.on('step.completed', @transition)
      TaskStepActions.complete(stepId)
    else
