1

Like most people with "hybrid" touchscreen devices on Windows 8 or 8.1 (Windows 10 isn't an option for me right now for various reasons), I'm constantly annoyed by the "metro-style" on-screen keyboard popping up automatically even though I have an actual physical keyboard connected.

The best answer to this problem, without disabling the service completely (because I do sometimes use the device without a physical keyboard) is to open then minimise the old-school desktop-style on-screen keyboard. That application being open, even when minimised, stops the touchscreen metro-style keyboard popping up.

However, this also creates a (smaller) nuisance:

  • It's something I have to do every time I start up the computer
  • It un-minimises every time I put the computer to sleep, partially covering the lock screen, the picture password screen, and the Start screen.

Is there any way (bat script for example?) that I can make the onscreen keyboard open then minimise every time the computer starts up from shut down or from sleep?

2 Answers2

1

It sounds like BramMooij is onto a potential answer. I have an alternative suggestion that I have tested if his answer doesn't pan out.

First download nircmd if you don't already have it.

Create a batch file wherever you please and put the following code into it...

osk.exe
PING -n 3 127.0.0.1>nul
"locationOfNircmd\nircmd.exe" win hide title "On-Screen Keyboard"

Add the batch file to Task Scheduler as the action, and set the trigger as wake up from sleep or shutdown.

You may need to alter the "3" in the ping line depending on the performance of your computer, as osk sometimes takes a little while to appear in my testing (it is just a delay action in seconds). You will also need to replace LocationOfNircmd to where you copied those files. In my tests this task needs to be run as administrator in order to hide the keyboard.

1

I think I have a solution for your second problem.

Instead of getting rid of the osk window, you could change the position of the osk window to not be in your way. Open regedit, go to: HKEY_CURRENT_USER\Software\Microsoft\Osk.

Here you can set the WindowWidth, WindowHeight, and also WindowTop and WindowLeft. By changing the values for WindowTop and WindowLeft you can change the position. If you set both to 1 the osk window will start in the top left corner of your screen. You could use this to move the Window to a non-annoying position, then you only have the minimise after logon issue left.

I'm still working on the solution to your first problem. I made an autohotkey script to minimise the osk.exe window with a mouse click (assuming you know the position), but osk.exe acts different to most other programs. You cannot minimise it from the command line, and my autohotkey script can click everything but the osk window. It seems like the osk Window is sort of overlaying the rest causing the ahk mouseclick to disappear behind the window. I will try to figure this out and report back with the complete answer if I manage to find it.

BramMooij
  • 828