title: Using Key Event to return back in my application
body: <p>I tried this code, but I don't know where to "put it" : Is it inside the main.lua or in each level01, level02, ect... ?</p>
  
  <p>I tried to insert this code, but it works only a time. I put this code before my </p>
  
  <blockquote>
    <p>scene:createScene()</p>
  </blockquote>
  
  <pre><code>function onBackButtonPressedAtMap(e)
      if (e.phase == "down" and e.keyName == "back") then
          --Here the key was pressed      
          downPress = true
          return true
      else 
          if (e.phase == "up" and e.keyName == "back" and downPress) then
              storyboard.returnTo = "start"
              Runtime:removeEventListener( "key", onBackButtonPressedAtMap)
              return true
          end
      end
      return false
  end
  Runtime:removeEventListener( "key", onBackButtonPressedAtMap)
  </code></pre>