# Use of volume keys

**URL:** <https://discourse.processing.org/t/use-of-volume-keys/10973>\
**Category:** Processing for Android\
**Created:** [May 6, 2019, 3:58pm UTC](https://discourse.processing.org/t/use-of-volume-keys/10973 "2019-05-06T15:58:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MichaelHecht](https://avatars.discourse-cdn.com/v4/letter/m/edb3f5/32.png) [@MichaelHecht](https://discourse.processing.org/u/MichaelHecht)\
**Post date:** [May 6, 2019, 3:58pm UTC](https://discourse.processing.org/t/use-of-volume-keys/10973/1 "2019-05-06T15:58:14Z")

</div>

Hi,

under windows I used the mouse wheel for changing the Z-Position in a P3D-Environment. Now I want to do the same with the volume keys in android.

Is this possible?

Thanks in andvance

Michael

---

<div class="post-metadata">

**Author:** ![jacopom](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jacopom/32/5023_2.png) [@jacopom](https://discourse.processing.org/u/jacopom)\
**Post date:** [May 6, 2019, 8:32pm UTC](https://discourse.processing.org/t/use-of-volume-keys/10973/2 "2019-05-06T20:32:55Z")

</div>

I think that might be hard but maybe there’s a hacky way to do that using this event:

[https://www.w3schools.com/jsref/event\_onvolumechange.asp](https://www.w3schools.com/jsref/event_onvolumechange.asp)

---

<div class="post-metadata">

**Author:** ![akenaton](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@akenaton](https://discourse.processing.org/u/akenaton)\
**Post date:** [May 7, 2019, 8:21am UTC](https://discourse.processing.org/t/use-of-volume-keys/10973/3 "2019-05-07T08:21:58Z")

</div>

@MichaelHecht ===  
that is a standard keyEvent for android: just override it  
[https://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE\_VOLUME\_DOWN](https://developer.android.com/reference/android/view/KeyEvent.html#KEYCODE_VOLUME_DOWN)

(of course the same for up or mute)
