Click here to Skip to main content
15,887,340 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,
I’ve a requirement of taking control of windows on screen keyboard.
From my code I’m able to start process and launch on screen keyboard.
Now I want to type key programmatically.
How do I do this?

What I have tried:

I tried starting the on screen keyboard and I can see its working..
only thing is to type key programmatically.
Posted
Updated 15-May-20 20:31pm

1 solution

Why? I'm sure it's possible, by sending the appropriate mouse clicks to the process, but ... it's fraught with problems, not the least being that there are at least four different layout types, and dozens of different key mappings for different languages. My surface will regularly show me US or UK layouts, seemingly at random for example. Plus it and be fixed, or floating; landscape or portrait. So without knowing exactly what layout Windows is using at this moment in time (and adapting as the tablet is rotated and the OSK moved about the screen) You aren't get to get a good result, unless you "take control" of the OSK and how it is displayed. And that will annoy users - mess with my OSK and I'll delete your software, demand my money back, and compensation.
And that's all ignoring that having the OSK suddenly appear, steal 1/2 or 1/3 of my screen, type something too quick for me to read, and vanish again is going to really annoy people even if it doesn't start causing epileptic attacks in the sensitive.

Instead, think about the task you are trying to perform, and consider if there might be a better - more standard - way to do what you are trying. This way is almost certainly a very bad idea.
 
Share this answer
 
Comments
domneck 16-May-20 4:26am    
Performance wise it’s ok for me..
Is there any code snippet available to control the on screen keyboard..
Basically my requirement is I want to automate the typing using windows on screen keyboard ..

Already I’ve solution with sendkeys & send message.
Similar way I want to do with osk

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900