RFR: 8356652: Input field ignores custom input source characters [v2]

Martin Fox mfox at openjdk.org
Sat May 17 00:30:56 UTC 2025


On Fri, 16 May 2025 23:02:30 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

> It is weird that we have to add third-party specific code to JavaFX as a workaround - why doesn't macOS provide a general purpose API for this?

Normally an input method is designed for a specific language and is bundled with a collection of keyboard layouts. The input method is an active blob of code but the keyboard layouts are basically big passive tables mapping hardware key positions to characters. It appears that Keyman is trying to use one input method that works with all of its layouts. It's not producing the corresponding data tables; the OS just sees the same Roman table when it generates events. We're basically working around that mis-match.

To really do this right Keyman would either have to create new layout tables on-the-fly (assuming they can, I've never tried it) or use a low-level event tap to re-write the keyboard events (assuming they can, I've never tried it). I suspect the API's are available but are probably a devil to get right.

-------------

PR Comment: https://git.openjdk.org/jfx/pull/1805#issuecomment-2887887550


More information about the openjfx-dev mailing list