Create Virtual Keyboard Component for TextEditor

Due to a limitation with Android and setting the keyboard type programmatically, I'm thinking of creating a numeric keypad input component in JUCE, for the TextEditor subcomponent of Slider. 

I've already made some changed to TextEditor giving it a keyboardType member, so I can check for numeric keyboard type. (I've sent Jules a patch for this)

I'm going to see where I need to override the OS call to showKeyboard. 

Just wondering if anyone else has done this already and might have some pointers or code to share. 



Note: I am also going to try doing it all in Java as per this post on stackoverflow:



Is this the function you are talking about:

void TextEditor::setKeyboardType ( VirtualKeyboardType  type ) ?


The thing is that it is not documented and I have no idea how to use it. Setting VirtualKeyboardType::numericKeyboard has no impact on what is shown on my dev Android tablet. Probably I just don't understand how to use it.



Yes it has no effect on Android due to security limitations. 

So it works on iOS then? I have no way of trying that out at the moment.


Hi, is this still the case for Android?
This doc seems to make it sound trivial for platform controls, at least:

So - it looks like there’s an attempt at this in the juce android peer classes, but it doesn’t work. I can’t quite see how it expects to, so it’s hard to debug. This is on a virtual device running 8.1.

Does it work for anyone? I stepped in and there’s a message that gets posted on the system queue, and I can’t tell where to pick that up to debug more, but keyboard shows, and it’s always standard keyboard.

Edit - works somewhat on a real device.