Add On-Screen Keyboard Support

From what I can tell, there is minimal support for the on-screen keyboard (particularly on mobile where it’s most relevant).

Useful features:

  • Controlling text suggestions
  • Finding out the height of the keyboard
  • Having a listener for when the keyboard is shown and hidden
    • and/or providing facilities to move the viewable region around as needed in order to focus the view on the text editor.

Platform specific classes:

Yes! That would be very helpful.

1 Like

@jules @ed95
finding out the height of the keyboard, respectively a call to resized would be necessary to release a useful application :wink:

2 Likes

Yep. Without this feature you’re basically dead in the water for anything text input.

5 Likes

I am also missing this feature.

Sorry for bumping this but is it possible to add getOnScreenKeyboardHeight() or something similar? Or maybe it is already added but I cannot find it?

Thanks for the suggestion. We’ve now added a ‘keyboard insets’ member to juce::Displays::Display, which can be queried to find the area of the screen hidden by a virtual keyboard.

This should work on all supported iOS versions, but only on Android API level 30+ (Android 11).

We’ve also updated text input handling on iOS, so navigating with cursor keys (or with spacebar press-and-drag) should work as expected now.

5 Likes

I can’t find in the library :frowning:

Having a listener for when the keyboard is shown and hidden

This does not seem to be provided even in the latest JUCE.
Maybe I’m just missing something, but is there a way to detect the On-Screen Keyboard display/hide change?