Capture backbutton and menubutton