How to disable the little touch-keyboard on Window

2020-03-31 03:40发布

In a windows version with tablet support, a small keyboard icon appears when an edit control gets focus. If you touch it the touch keyboard pops up.

Is there a way to disable this? It's rather inconvenient if you have your own touch keyboard.

I want to disable it for certain edit controls in code, ie. I'm not looking for a Windows setting.

Giel

2条回答
闹够了就滚
2楼-- · 2020-03-31 03:52

Well, I guess a late answer is better than no answer, so here it comes:

You can disable the Windows onscreen-keyboard for your application. To do so, start Regedit and navigate to the Key [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\TabletTIP\DisableInPlace]. There you create a new String Value, set its name to the full application Path (e.g. "C:\Progam Files\My App\MyApp.exe") and set its value to "1".

Edit: Recently I had to rethink my solution... By setting the Registry value, you disable the onscreen-keyboard for the whole application. But should you need a keyboard for some seldom used function of your program and just happend to forget including an onscreen-keyboard, you have to control the Windows TextInputPanel via SDK / API. See this link: Disabling the Input Panel Programmatically. Use the PenInputPanel for handwriting and the TextInputPanel for an onscreen-keyboard.

For all those Delphi programmers out there: import the Type Library "Microsoft PenInputPanel" and FIX A BUG in the imported *_TLB.pas: change the parameter type of the two methods of IPenInputPanel:

function Get_AttachedEditWindow: SYSINT; safecall;
procedure Set_AttachedEditWindow(AttachedEditWindow: SYSINT); safecall; 
查看更多
聊天终结者
3楼-- · 2020-03-31 03:58

Disable the "Touch Keyboard and Handwriting Panel Service"

查看更多
登录 后发表回答