Use onKeyDown and onKeyUp to detect back button