Skip to content

Add non-predictive text keyboard type#445

Merged
jperedadnr merged 2 commits intogluonhq:masterfrom
jperedadnr:165-3-keyboardnopredictive
May 6, 2026
Merged

Add non-predictive text keyboard type#445
jperedadnr merged 2 commits intogluonhq:masterfrom
jperedadnr:165-3-keyboardnopredictive

Conversation

@jperedadnr
Copy link
Copy Markdown
Contributor

As a follow-up of 165, add a new keyboard type, mainly for Android, that can be used to have text input controls without predictive text (even if user keeps the predictive text enabled in the device settings).
On iOS there is no predictive support yet.

Copilot AI review requested due to automatic review settings May 6, 2026 10:35
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new KeyboardType intended to request a “non-predictive text” keyboard (primarily for Android), and adds an iOS-side fallback because iOS currently has no equivalent for disabling suggestions/predictive text via keyboard type.

Changes:

  • Add KeyboardType.TEXT_NO_SUGGESTIONS(12) API constant with documentation.
  • Add iOS native fallback that maps unsupported values (including 12) to UIKeyboardTypeASCIICapable.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
modules/keyboard/src/main/native/ios/Keyboard.m Adds range checking/fallback for unsupported keyboard type values on iOS.
modules/keyboard/src/main/java/com/gluonhq/attach/keyboard/KeyboardType.java Adds the new TEXT_NO_SUGGESTIONS enum constant and its Javadoc.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread modules/keyboard/src/main/native/ios/Keyboard.m Outdated
Comment thread modules/keyboard/src/main/java/com/gluonhq/attach/keyboard/KeyboardType.java Outdated
Comment on lines +105 to +109
* A text keyboard with autocorrection, suggestions and predictive text
* disabled. Useful for fields that should accept raw user input
* (identifiers, codes, tokens, login input).
*
* <p>On iOS this value fall back to an ASCII-capable keyboard.</p>
Comment on lines +104 to +111
/**
* A text keyboard with autocorrection, suggestions and predictive text
* disabled. Useful for fields that should accept raw user input
* (identifiers, codes, tokens, login input).
*
* <p>On iOS this value fall back to an ASCII-capable keyboard.</p>
*/
TEXT_NO_SUGGESTIONS(12);
@jperedadnr jperedadnr merged commit 76eb114 into gluonhq:master May 6, 2026
1 check passed
@jperedadnr jperedadnr deleted the 165-3-keyboardnopredictive branch May 6, 2026 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants