Detecting popup keyboard on Windows 10

Deploying to Windows? Utilizing VB Script execution? This is the place to ask Windows-specific questions.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
mvillion
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 107
Joined: Sun Feb 24, 2013 12:29 pm

Detecting popup keyboard on Windows 10

Post by mvillion » Mon Oct 08, 2018 10:17 pm

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?

LiveCode_Panos
Livecode Staff Member
Livecode Staff Member
Posts: 818
Joined: Fri Feb 06, 2015 4:03 pm

Re: Detecting popup keyboard on Windows 10

Post by LiveCode_Panos » Wed Oct 10, 2018 11:52 am

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
--

mvillion
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 107
Joined: Sun Feb 24, 2013 12:29 pm

Re: Detecting popup keyboard on Windows 10

Post by mvillion » Wed Oct 10, 2018 10:35 pm

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.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Detecting popup keyboard on Windows 10

Post by richmond62 » Thu Oct 11, 2018 9:52 am

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.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Detecting popup keyboard on Windows 10

Post by richmond62 » Thu Oct 11, 2018 10:22 am

working screenRect does work for OnBoard, interestingly enough:
-
REX1.png
-
REX2.png
-
REX.livecode.zip
(649 Bytes) Downloaded 281 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

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Detecting popup keyboard on Windows 10

Post by richmond62 » Thu Oct 11, 2018 9:28 pm

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.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9287
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Detecting popup keyboard on Windows 10

Post by richmond62 » Fri Oct 12, 2018 7:37 am

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.

Post Reply

Return to “Windows”