# How to emulate a back key or swipe gesture

**URL:** <https://community.thunkable.com/t/how-to-emulate-a-back-key-or-swipe-gesture/715082>\
**Category:** Questions about Thunkable X\
**Created:** [August 1, 2020, 2:56pm UTC](https://community.thunkable.com/t/how-to-emulate-a-back-key-or-swipe-gesture/715082 "2020-08-01T14:56:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [August 1, 2020, 2:56pm UTC](https://community.thunkable.com/t/how-to-emulate-a-back-key-or-swipe-gesture/715082/1 "2020-08-01T14:56:46Z")

</div>

My client insists on having an “Exit” button for the App. I thought if I can cause the a back key pressed or a swipe gesture when the button is pressed it should do the job but how to emulate it.

Please advise.

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [August 1, 2020, 3:29pm UTC](https://community.thunkable.com/t/how-to-emulate-a-back-key-or-swipe-gesture/715082/2 "2020-08-01T15:29:09Z")

</div>

Unfortunately, this is not yet possible.

I only know one way to exit the app when you click the Back button or any other button, but I’m afraid that your client won’t like it - in the event handler, cause the app to crash. But, unfortunately, this leads to the display of a dialog about crash occurrence.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [August 1, 2020, 4:38pm UTC](https://community.thunkable.com/t/how-to-emulate-a-back-key-or-swipe-gesture/715082/3 "2020-08-01T16:38:29Z")

</div>

Many thanks for your reply.

Although the idea of providing a button to crash the system is “counter intuitive”, I am curious to know it.

---

<div class="post-metadata">

**Author:** ![actech](https://avatars.discourse-cdn.com/v4/letter/a/3d9bf3/32.png) [@actech](https://community.thunkable.com/u/actech)\
**Post date:** [August 1, 2020, 6:31pm UTC](https://community.thunkable.com/t/how-to-emulate-a-back-key-or-swipe-gesture/715082/4 "2020-08-01T18:31:32Z")

</div>

OK, here’s a simple example for creating a crash on Android. I was not able to crash on iOS, because the crash just shows a white screen.

![изображение](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/8/8837679cb9507468d9fb12ae9466a9ce03aeb76e.png)

---

<div class="post-metadata">

**Author:** ![eoinparkinson](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/eoinparkinson/32/143769_2.png) [@eoinparkinson](https://community.thunkable.com/u/eoinparkinson)\
**Post date:** [August 2, 2020, 12:35am UTC](https://community.thunkable.com/t/how-to-emulate-a-back-key-or-swipe-gesture/715082/5 "2020-08-02T00:35:34Z")

</div>

Just to add to this, Apple has stated before that apps should not close themselves. This may be a red flag when submitting your app for the App Store.

As far as `React` goes, there is no current built in function to close the app, so this would be a platform limitation and you will probably never see this feature.

However, the open link block allows for deep-linking, for example, open the app settings in the OS Setting’s app using `app-settings:` . I haven’t looked into this much, but this may have the option to go to the home screen?

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [August 2, 2020, 3:49am UTC](https://community.thunkable.com/t/how-to-emulate-a-back-key-or-swipe-gesture/715082/6 "2020-08-02T03:49:19Z")

</div>

Thank you. I will look into deep linking and see if there is a way or simply say to my client, based on your explanation, such function cannot be implemented.

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 12:26pm UTC](https://community.thunkable.com/t/how-to-emulate-a-back-key-or-swipe-gesture/715082/7 "2024-11-08T12:26:52Z")

</div>


