1

I have tried executing a taskkill to shut down the On screen Keyboard in windows 10 (OSK.exe), but the OSK seems to behave differently in windows 10... while I can launch the application, I cant shut it down as before with taskkill. Even in the command prompt I get an access denied error... I would settle for the ability to at least minimize it, but that is something I don't know how to do.. any suggestions? My processing line looks like this

public void onScreenKbdMain_click1(GImageButton source, GEvent event) { 
  println("onScreenKbdMain - GImageButton >> GEvent." + event + " @ " + millis());
  if (keyboardOnOff == false) {
    sentense="Onscreen keyboard activated";
    String[] params = { 
      "C:/bala/bala.exe", "-t", sentense
    }; 
    launch(params);
    //pKeyboard = open(new String[] { "c:/Windows/system32/osk.exe" } ); // Windows Keyboard
    pKeyboard = launch(new String[] { 
      "osk"
      } 
      ); // Windows Keyboard
    keyboardOnOff=!keyboardOnOff;
    //println("keyboardOnOff= "+keyboardOnOff);
  } else {
    sentense="Onscreen keyboard disabled";
    String[] params = { 
      "C:/bala/bala.exe", "-t", sentense
    }; 
    launch(params);
    pKeyboard = launch(new String[] { 
      "taskkill IM/osk.exe/T/F"
      } 
      ); // Windows Keyboard
    keyboardOnOff=!keyboardOnOff;
    //println("keyboardOnOff= "+keyboardOnOff);
  }
}
5
  • Why would you want to close the onscreen keyboard? And isnt that file "OSK.exe" only accessable administrator permissions?
    – 97hilfel
    Commented Jan 25, 2017 at 17:33
  • 1
    I suspect new String[] { "taskkill IM/osk.exe/T/F" } should be new String[] { "taskkill", "/IM", "osk.exe", "/T", "/F" }.
    – VGR
    Commented Jan 25, 2017 at 18:44
  • I call up osk as needed but need it gone or at least minimized the rest of the time.... I have to do it from within the processing/java app Commented Jan 25, 2017 at 21:21
  • I will try your suggestion and see if that helps Commented Jan 25, 2017 at 21:22
  • I tried new String[] { "taskkill", "/IM", "osk.exe", "/T", "/F" } but got the same results... it is definitely a security issue in windows... I tried this in the command prompt and got an "access denied" error.... Commented Jan 25, 2017 at 21:38

1 Answer 1

0

Check my answer here: https://stackoverflow.com/a/71410876/12346089 is using TabTip.exe instead of osk.exe but it may work for you.

Not the answer you're looking for? Browse other questions tagged or ask your own question.