Hi. I'm really liking Juce so far; nice clean API, great docs. Awesome!
Is there any way to have Juce respond to Android device buttons - e.g. Back, Menu? I've searched a few times, but haven't found anything so far. Possibly I'm just using the wrong keywords :)
This has been on my to-do-list.. I was rather hoping that someone using android would give me a helpful snippet that points me in the right direction... :)
I'll try Rory's suggestion, and see if I get anything from keyPressed. That would certainly be a sensible way for the device to report it, but I suspect Android might not be that sensible :) Otherwise I'll take a look around the Android docs and post here again if I find anything useful. If it does involve Java, my motivation to get it working may diminish somewhat ;)
In our app it is a huge issue unfortunately that if you type text into a text editor and press the back button that the keyboard reappears, as the text editor natively doesn’t lose focus. This wouldn’t be a problem at all if I could unfocus everything on pres of the back button. Unfortunately the back button is not handled by the keyPressed event in any way!
Another one on this bumpy road here:
I’d like to intercept volume rocker events.
While nothing(!) happens on android, it (sort of) works on windows (surface pro 7):
keyPressed() gets called, but the keyCode is always 0, while it should be 174(0xAE) or 175(0xAF).
I’m not into keycodes, unicode and implementation layers, but could it be a reason there is no Keypress::volumeUpKey implemented (yet)?
doKeyDown() (juce_win32_Windowing.cpp, line 3017) however runs into the switche’s default and tries translating it into unicode, but ToUnicode() obviously returns “0”
There are definitions for play, stop etc. in juce_keyPress.h though, and volume keys are listed at least in winUser.h…
Puhh, much info, hope it doesn’t confuse…
Maybe somebody can point me to the right direction?
Thanks!!