keymanapp / keymanapp/keyman

[iOS] Integrate the system keyboard menu when appropriate

Open
#2,384 1 comment 0 reactions 0 assignees View on GitHub
feat ios/
Dominant language
Pascal
Stars
534
Forks
143
Avg merge
2d 10h
Merged PRs (30d)
113

Description

As of iOS 10, there's a new API function of interest: https://developer.apple.com/documentation/uikit/uiinputviewcontroller/1649584-handleinputmodelist

While its base design is oriented for use as a selector for use by UI elements, we should be able to instead create special calls to this function that would allow the popup keyboard menu to provide an option to directly access the system keyboard menu instead. We'll probably need a bit of design work on how the integration should work, but this can provide much better control when swapping between system keyboards and Keyman.

Use of this feature is probably only appropriate for devices older than the iPhone X, which has its own, separate globe key outside of the keyboard. (Look for the `needsInputModeSwitchKey` property, which signals when iOS itself is providing this extra, keyboard-external version to users.) For devices with this set to `true`, the current menu is likely sufficient.

On investigation, this will likely require, at minimum, a partial rework on the `KeyboardMenuView` class - the design of `handleInputModeList` practically requires assigning the function via selector as a callback for a `UIButton`'s touch events. (Synthetically generating a UIEvent requires undocumented API and will likely lead to App Store rejection. The parameter can't be left `nil`.)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.