keymanapp / keyman

Keyman cross platform input methods system running on Android, iOS, Linux, macOS, Windows and mobile and desktop web
https://keyman.com/
Other
403 stars 112 forks source link

OSK issue with &KMW_HelpText #759

Open jahorton opened 6 years ago

jahorton commented 6 years ago

It appears that when &KMW_HelpText is set, the OSK does not appear, in some circumstances (e.g. see nw_iranian_latin keyboard).

jahorton commented 6 years ago

Further investigation - the nw_iranian_latin keyboard has nothing set for a 'desktop' form factor OSK. Only for the mobile variants.

jahorton commented 6 years ago

Ah, did a little more research and found the root issue. KMW sees both store(&kmw_helpfile) and store($kmw_helptext) in the same JS keyboard field, making them indistinguishable to the KMW engine.

Furthermore, the keyboard's OSK is literally the standard US layout; the code doesn't specify any key caps. There's an existing test in KMW that disables the OSK for this case, where the OSK "is just a placeholder."

Combined, this eliminates the placeholder layout, resulting in failure of the following test for desktop form factors:

if(Lviskbd != null || Lhelp == '' || device.touchable) { //...

This disables the OSK when any help text is present, even when it's sourced by &kmw_helptext instead of &kmw_helpfile.

jahorton commented 5 years ago

More notes - the Lhelp == '' check detects the use of the CJK picker for relevant keyboards. Removing this check outright will likely result in unintended behavior for desktop use.