On Sunday, January 28, 2018 at 10:52:08 AM UTC-5, Knute Johnson wrote:
> I think that is wound into to OS so far that you probably won't get it
> to work consistently. There is a windows program, TabTip.exe, that is
> an onscreen keyboard but getting it to show up when you want is another
> matter.
>
> I think I would just create my own onscreen keyboard if I didn't want my
> users to have to figure out how to get the system onscreen keyboard to
> work.
>
> --
>
> Knute Johnson
I found some hacks, from making the Windows keyboards appear to displaying a keyboard made from Java code. Oddly Windows seems to come with 2 keyboards, TabTip.exe and osk.exe. I already have a focus listener on my controls to display a blue focused border, so calling an exe shouldn't be so bad. Now I need to know when to call it. We're running the same code on desktops (currently running Win 8.1 Pro) and on tablets (Surface Pro 4 running Windows 10 Pro). Normally desktops will have a keyboard "attached" (some are wireless) and normally the tablets will not. I need to display the virtual keyboard only if no physical keyboard is present (or if the device supports touch screen events?). I tried searching for Java code to check this and mostly found Android code.
Runtime.getRuntime().exec(
"cmd /c \"C:\\Program Files\\Common Files\\microsoft " +
"shared\\ink\\tabtip.exe\"" );
I'm testing on desktop, will need to test on the tablet, but I think I like tabtip better than osk.