Page 1 of 1

Detecting popup keyboard on Windows 10

Posted: Mon Oct 08, 2018 10:17 pm
by mvillion
Hi

I have an app that works well on iOS that has code to detect when the popup keyboard is activated
keyboardactivated and keyboarddeactivated

I need to detect the same on a Windows 10 device when they are in tablet mode as the popup keyboard hides the bottom of the app..

The above mentioned commands do not trigger

Any ideas?

Re: Detecting popup keyboard on Windows 10

Posted: Wed Oct 10, 2018 11:52 am
by LiveCode_Panos
Hello Matt,

These messages are sent on iOS and Android only.

However, you might use the "effective working screenrect" to decide if the keyboard is shown.

Or you can use the "openField"/"closeField" message, to detect when a field gets/loses the focus (which is when the keyboard shows/hides).

Best,
Panos
--

Re: Detecting popup keyboard on Windows 10

Posted: Wed Oct 10, 2018 10:35 pm
by mvillion
Thanks

I will try tying the openfield and 'effective workings screenrect' together as I have tried the openfield and closefield on their own.

On there own it got a little weird in that it opened the field, the keyboard appeared, this caused the loss of focus on the field causing a closefield event. The keyboardactivated and keyboarddeactivated worked perfectly on iOS.

I think the magic is to mix the two together, detect an open field - use that to extract the 'effective workings screenrect' parameters which can be used to determine what is actually going on. I will report back on my findings and code.

Re: Detecting popup keyboard on Windows 10

Posted: Thu Oct 11, 2018 9:52 am
by richmond62
This is not a Windows 10 - only concern.

On both Macintosh and Linux there are all sorts of onscreen keyboards that either popup
or are end-user initiated.

Here's OnBoard on XFCE (Xubuntu) for instance:
-
onboard.jpg
-
I am not sure if LiveCode can detect all "screen furniture" as such, because, while start menu bars, panels
and so on may be part of the operating system, some of these things are actually "apps" that are not part of the OS.

Re: Detecting popup keyboard on Windows 10

Posted: Thu Oct 11, 2018 10:22 am
by richmond62
working screenRect does work for OnBoard, interestingly enough:
-
REX1.png
-
REX2.png
-
REX.livecode.zip
(649 Bytes) Downloaded 59 times
-

Code: Select all

on mouseUp
   put the screenRect into line 1 of fld "SR"
   put the working screenRect into line 2 of fld "SR"
   put the effective working screenRect into line 3 of fld "SR"
end mouseUp

Re: Detecting popup keyboard on Windows 10

Posted: Thu Oct 11, 2018 9:28 pm
by richmond62
However . . .
-
while things work alright on the Macintosh for resizing the Dock:
-
MacStandard.jpg
-
MacSmallDock.jpg
-
there are effectively useless for the Macintosh Keyboard Viewer:
-
MacKeyboardViewer.jpg
-
which is NBG.

Re: Detecting popup keyboard on Windows 10

Posted: Fri Oct 12, 2018 7:37 am
by richmond62
I wonder if it might not be a good thing if . . .

There were some way LiveCode could detect screen estate being occupied by any Window, Widget or Whatever.

At present there is an inconvenient inconsistency both in-platform and cross-platform which makes the whole exercise a bit pointless.