controlling a virtual keyboard for touch enabled application

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
jpo234
Experienced Solver
Experienced Solver
Posts: 70
Joined: Tue Feb 25, 2020 11:34 am

controlling a virtual keyboard for touch enabled application

Post by jpo234 »

What is the correct way to show and hide the system's on-screen keyboard from a C++ wxWidgets application? I couldn't find an example or documentation...
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: controlling a virtual keyboard for touch enabled application

Post by doublemax »

There is nothing in wxWidgets to do this in a cross-platform way. I'm not sure if it's even needed. At least under Windows 10, when ever you click into a text field on a touch device, the virtual keyboard shows up automatically.
Use the source, Luke!
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: controlling a virtual keyboard for touch enabled application

Post by ONEEYEMAN »

Hi,
The best way would probably be to create a floating frame with 101 buttons.

However I'm not sure how it will handle international keyboards...

Thank you.
jpo234
Experienced Solver
Experienced Solver
Posts: 70
Joined: Tue Feb 25, 2020 11:34 am

Re: controlling a virtual keyboard for touch enabled application

Post by jpo234 »

ONEEYEMAN wrote: Tue Mar 09, 2021 7:48 pm Hi,
The best way would probably be to create a floating frame with 101 buttons.

However I'm not sure how it will handle international keyboards...

Thank you.
I wanted to interact with the system's virtual keyboard, not re-implement one...
jpo234
Experienced Solver
Experienced Solver
Posts: 70
Joined: Tue Feb 25, 2020 11:34 am

Re: controlling a virtual keyboard for touch enabled application

Post by jpo234 »

doublemax wrote: Tue Mar 09, 2021 7:34 pm There is nothing in wxWidgets to do this in a cross-platform way. I'm not sure if it's even needed. At least under Windows 10, when ever you click into a text field on a touch device, the virtual keyboard shows up automatically.
But that would only work with native text input controls, wouldn't it?
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: controlling a virtual keyboard for touch enabled application

Post by ONEEYEMAN »

Hi,
jpo234 wrote: Wed Mar 10, 2021 6:16 pm
ONEEYEMAN wrote: Tue Mar 09, 2021 7:48 pm Hi,
The best way would probably be to create a floating frame with 101 buttons.

However I'm not sure how it will handle international keyboards...

Thank you.
I wanted to interact with the system's virtual keyboard, not re-implement one...
What did you want to do?
Can you explain a little more?

Do you have to display the keyboard in order to do you task?

Thank you.
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: controlling a virtual keyboard for touch enabled application

Post by doublemax »

jpo234 wrote: Wed Mar 10, 2021 6:18 pm But that would only work with native text input controls, wouldn't it?
Yes. For which platforms do you needs this?

For Windows it should be possible to the find the executable of the virtual keyboard and start it yourself. Google "msdn show osk".
Use the source, Luke!
jpo234
Experienced Solver
Experienced Solver
Posts: 70
Joined: Tue Feb 25, 2020 11:34 am

Re: controlling a virtual keyboard for touch enabled application

Post by jpo234 »

doublemax wrote: Wed Mar 10, 2021 7:44 pm
jpo234 wrote: Wed Mar 10, 2021 6:18 pm But that would only work with native text input controls, wouldn't it?
Yes. For which platforms do you needs this?

For Windows it should be possible to the find the executable of the virtual keyboard and start it yourself. Google "msdn show osk".
Sorry for the delay, I got side tracked by an urgent task. This is supposed to be a cross platform application running on Win10 and Linux. And yes, I need a way to activate the system's OSK in a portable way, something like a hypothetical "wxOSK::show(true)".
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: controlling a virtual keyboard for touch enabled application

Post by doublemax »

There is nothing like this in wxWidgets, i guess you'll have to find a custom solution for each platform yourself.
Use the source, Luke!
Post Reply