Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calling the on-screen keyboard using a button in C#

I am creating a windows application using C#, where in a button on the GUI when clicked, should display the on-screen keyboard.

Would appreciate if any help is granted. thanks.

Also, since I am mostly using Emgu Cv library for the rest of my app, Can we simply use it for calling the On-screen keyboard?

like image 947
ykombinator Avatar asked Jan 10 '12 08:01

ykombinator


People also ask

How do you call the keyboard on the screen?

To open the On-Screen KeyboardGo to Start , then select Settings > Accessibility > Keyboard, and turn on the On-Screen Keyboard toggle. A keyboard that can be used to move around the screen and enter text will appear on the screen. The keyboard will remain on the screen until you close it.

How do I get keyboard inputs on my screen?

Open the keyboard Settings . At the bottom, select Advanced. Under "Accessibility," select Manage accessibility features. Under "Keyboard and text input," select Enable on-screen keyboard.

How do I open my onscreen keyboard with mouse?

To access the keyboard via a shortcut, press the CTRL + Windows key + O (letter o) simultaneously. The keyboard will appear on your screen after a few seconds and you can use your mouse to select keys or other commands.


2 Answers

In C#, you can simply write the following line of code to invoke the on-screen keyboard application that comes with Windows:

System.Diagnostics.Process.Start("osk.exe");

You can find more help here.

like image 78
Jits Avatar answered Sep 28 '22 03:09

Jits


For Windows 10 x64, You have set the project build to x64 as shown in image.

enter image description here

Process process = Process.Start(new ProcessStartInfo(
            ((Environment.GetFolderPath(Environment.SpecialFolder.System) + @"\osk.exe"))));
like image 40
Hassan Rahman Avatar answered Sep 28 '22 03:09

Hassan Rahman