# Reading swipe direction(left,up,down,right)

**URL:** https://discourse.processing.org/t/reading-swipe-direction-left-up-down-right/7742
**Category:** Processing for Android
**Created:** [January 22, 2019, 3:27pm UTC](https://discourse.processing.org/t/reading-swipe-direction-left-up-down-right/7742 "2019-01-22T15:27:46Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Sky](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sky/32/3013_2.png) [@Sky](https://discourse.processing.org/u/Sky)
#### Post date: [January 22, 2019, 3:27pm UTC](https://discourse.processing.org/t/reading-swipe-direction-left-up-down-right/7742/1 "2019-01-22T15:27:46Z")

</div>

is there something similar to key (or keyCode) for Android?

---

<div class="post-metadata">

### Author: ![BennyHacker](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/bennyhacker/32/2969_2.png) [@BennyHacker](https://discourse.processing.org/u/BennyHacker)
#### Post date: [January 22, 2019, 4:13pm UTC](https://discourse.processing.org/t/reading-swipe-direction-left-up-down-right/7742/2 "2019-01-22T16:13:58Z")

</div>

There should be some good resources on detecting gestures on this web page

[https://developer.android.com/training/gestures/detector](https://developer.android.com/training/gestures/detector)

If that doesn’t work, a simple and brute force solution would be to just store the previous touch events and decide what the direction is based on the difference
