[MOD REQUEST] Auto popup keyboard on desktop

Search This thread

tj!2k7

Senior Member
Jan 10, 2007
220
43
Ther keyboard does not autopop down
Yeah that would have been nice and it looks like it may be possible (http://stackoverflow.com/questions/...anel-programmatically-tabtip-exe-in-windows-v), but I have no idea how to implement an AutoIt equivalent tp the c++ solution posted towards the bottom.

Anyone wanna help with this?

For Windows 8:

Note: Just like the Windows 7 solution, this requires an elevated process.

The input panel is not a descendant of HWND_DESKTOP. (It's probably some kind of Metro window.) In order to get the window handle, do a series of horizontal sweeps in a grid-like pattern testing with WindowFromPoint(). For each test, check the window class of the parent window to see if it is "IPTip_Main_Window".

To show the input panel, launch "C:\\Program Files\\Common Files\\microsoft shared\\ink\\tabtip.exe". To determine if it is already in docked mode, read registry key:

HKEY_CURRENT_USER\Software\Microsoft\TabletTip\1.7\EdgeTargetDockedState

A value of 0 indicates the input panel is in floating mode. If that was the case, post the following message to toggle the docked state:

Code:
DWORD WM_DOCK_BUTTON_PRESSED = ::RegisterWindowMessage(_TEXT("IPTipDockButtonPressed"));
PostMessage(hwndInputPanel, WM_DOCK_BUTTON_PRESSED, 0, 0);

To hide the keyboard, post the following:

Code:
PostMessage(hwndInputPanel, WM_SYSCOMMAND, SC_CLOSE, 0);
 
Last edited:
  • Like
Reactions: duttyend

tj!2k7

Senior Member
Jan 10, 2007
220
43
Some revised AutoIt code; this seems to work pretty well for my Samsung SmartPC Pro to only pop up the virtual keyboard when it is not inserted in the keyboard dock.

AutoIt
Code:
While 1
	If RegRead('HKLM\SYSTEM\CurrentControlSet\Services\kbdclass\Enum', 'Count') = 1 Then
		$cursor = MouseGetCursor()
		Sleep(750)
		If $cursor = 5 And MouseGetCursor() = 5 Then
			$keyboard = ShellExecute('"C:\Program Files\Common Files\microsoft shared\ink\TabTip.exe"')
		EndIf
	EndIf
WEnd
 
Last edited:
  • Like
Reactions: duttyend

docfreed

Senior Member
Jun 6, 2009
912
168
Some revised AutoIt code; this seems to work pretty well for my Samsung SmartPC Pro to only pop up the virtual keyboard when it is not inserted in the keyboard dock.

Code:
While 1
	If RegRead('HKLM\SYSTEM\CurrentControlSet\Services\kbdclass\Enum', 'Count') = 1 Then
		$cursor = MouseGetCursor()
		Sleep(750)
		If $cursor = 5 And MouseGetCursor() = 5 Then
			$keyboard = ShellExecute('"C:\Program Files\Common Files\microsoft shared\ink\TabTip.exe"')
		EndIf
	EndIf
WEnd
Does it pop back down after you finish typing? That was my issue with the first iteration - the keyboard stays on screen.
 

tj!2k7

Senior Member
Jan 10, 2007
220
43
Does it pop back down after you finish typing? That was my issue with the first iteration - the keyboard stays on screen.
Unfortunately no, because I have no way to accomplish this properly.

I tried simply killing the TabTip process, which made the keyboard go away, but if the virtual keyboard was pinned, windows wouldn't automatically be re-sized to the proper screen height; if the keyboard was unpinned/floating, then there was no need to worry about resizing windows, but if the i-beam was located underneath the virtual keyboard, then the keyboard would keep popping up and down repeatedly,

I tried a few things, but have not found any workarounds yet. For now, hitting the X isn't too bad to close out the keyboard.
 
  • Like
Reactions: duttyend

docfreed

Senior Member
Jun 6, 2009
912
168
Unfortunately no, because I have no way to accomplish this properly.

I tried simply killing the TabTip process, which made the keyboard go away, but if the virtual keyboard was pinned, windows wouldn't automatically be re-sized to the proper screen height; if the keyboard was unpinned/floating, then there was no need to worry about resizing windows, but if the i-beam was located underneath the virtual keyboard, then the keyboard would keep popping up and down repeatedly,

I tried a few things, but have not found any workarounds yet. For now, hitting the X isn't too bad to close out the keyboard.
Enter or Esc will also pop it back down
 

tj!2k7

Senior Member
Jan 10, 2007
220
43
Enter or Esc will also pop it back down
My osk has never auto-popped down by Esc or Enter in Desktop mode. The only time the keyboard automatically closes itself in Desktop mode is when I press a key on the physical keyboard. Are you talking about Desktop or Metro mode?

For reference, I have a Samsumg ATIV SmartPC Pro (XE700T1C-A02).
 
  • Like
Reactions: duttyend

docfreed

Senior Member
Jun 6, 2009
912
168
My osk has never auto-popped down by Esc or Enter in Desktop mode. The only time the keyboard automatically closes itself in Desktop mode is when I press a key on the physical keyboard. Are you talking about Desktop or Metro mode?

For reference, I have a Samsumg ATIV SmartPC Pro (XE700T1C-A02).
Physical keyboard and ATIV 500 SmartPC Pro
 

_SpAiK_

Senior Member
Aug 5, 2010
115
7
Hey, this is a good solution! I love it although there is one thing that may be improved. I've noticed that the keyboard will also keep popping in when you are reading a text document. It would be perfect if it wouldn't pop until you reset the focus in that window after closed the first time.
 

jonthe838

Senior Member
Nov 14, 2010
129
14
Gothenburg
Just remember that I am running Win 8, not RT.. Anyway, I downloaded and installed AutoIt 3 from the AutoIt website (autoitscript.com). Then I copied tj!2k7's script into notepad, and named it keyboard.au3 ( saved as type *.txt but with the au3 extension). Then just right click on the au3 file, open with AutoIt and it will run the script - whenever you position the cursor in a text box, i.e., you see the cursor change to an I-beam, the keyboard will pop up - it's brilliant. Ther keyboard does not autopop down but I found if you hit the enter key it disappears.

thanks for the info but it still wont work for me. I'm running w8 on my acer w700. I run the avript and everything but nothing happens except a bunch of tasks that eat away on my memory
 
Last edited:

tj!2k7

Senior Member
Jan 10, 2007
220
43
Killing the keyboard without a force flag (/f on taskkill) will cause it to minimize properly without closing.
Can't seem to be able to do that. When I run taskkill /im tabtip.exe
I receive: ERROR: The process "TabTip.exe" with PID 5300 could not be terminated. Reason: Access is denied.

Seems to require admin permissions, but appears to work pretty well. Need to figure out a good way to implement this, thanks.

Hey, this is a good solution! I love it although there is one thing that may be improved. I've noticed that the keyboard will also keep popping in when you are reading a text document. It would be perfect if it wouldn't pop until you reset the focus in that window after closed the first time.

This code won't let the keyboard pop up again until the window title has changed (switched to another app, browsed to another page, etc.)

AutoIt
Code:
Global $title,$currentapp

While 1
	If RegRead('HKLM\SYSTEM\CurrentControlSet\Services\kbdclass\Enum', 'Count') = 1 Then
		AdlibRegister('checkwindow')
		$cursor = MouseGetCursor()
		$title = WinGetTitle('','')
		Sleep(1000)
		If $cursor = MouseGetCursor() And $cursor = 5 And $currentapp <> $title Then
			$keyboard = ShellExecute('"C:\Program Files\Common Files\microsoft shared\ink\TabTip.exe"')
			$currentapp = WinGetTitle('','')
		EndIf
	$title = WinGetTitle('','')
	EndIf
WEnd

Func checkwindow()
	$title = WinGetTitle('','')
EndFunc
 
Last edited:

scottdw

Member
Jul 18, 2007
20
6
I had your script converted to AutoHotKey because that is what I was more use to. The only issue I had was while in Metro the keyboard would popup and stay up so I found how to have the script not run while in Metro. I am not sure if it is the right way but works for me :) Here is my script with the bold line as being the only line I added:

Code:
#NoEnv
TabTip := A_ProgramFiles . "\Common Files\microsoft shared\ink\TabTip.exe"
While True {
   RegRead, KBCount, HKLM, SYSTEM\CurrentControlSet\Services\kbdclass\Enum , Count
   If (KBCount = 1) {
      Cursor := A_Cursor
      Sleep, 750
      If (Cursor = "IBeam") And (A_Cursor = "IBeam")
[B]IfWinNotActive, ahk_class Windows.UI.Core.CoreWindow[/B]
         Run, "%TabTip%"   ; or try the next line instead
         ; DllCall("Shell32.dll\ShellExecute", "Ptr", 0, "Ptr", 0, "Str", TabTip, "Ptr", 0, "Ptr", 0, "Int", 1)
   } Else {
      Sleep, 750
   }
}

I was also trying to figure out how to make the keyboard minimize when you click out of the field and ran into the same must run as Admin problem that you did. I found this but again is for AHK:
http://www.autohotkey.com/board/topic/46526-run-as-administrator-xpvista7-a-isadmin-params-lib/

So I downloaded the RunAsAdmin.ahk file and put it in C:\Program Files\AutoHotkey\lib\ and added the line in bold:
Code:
#NoEnv
[B]RunAsAdmin()[/B]
TabTip := A_ProgramFiles . "\Common Files\microsoft shared\ink\TabTip.exe"
While True {
   RegRead, KBCount, HKLM, SYSTEM\CurrentControlSet\Services\kbdclass\Enum , Count
   If (KBCount = 1) {
      Cursor := A_Cursor
      Sleep, 750
      If (Cursor = "IBeam") And (A_Cursor = "IBeam")
IfWinNotActive, ahk_class Windows.UI.Core.CoreWindow
         Run, "%TabTip%"   ; or try the next line instead
         ; DllCall("Shell32.dll\ShellExecute", "Ptr", 0, "Ptr", 0, "Str", TabTip, "Ptr", 0, "Ptr", 0, "Int", 1)
   } Else {
      Sleep, 750
   }
}

Now where to put the Taskkill....I don't know :laugh:
Testing it out with the RunAsAdmin does run the taskkill right but I could only get it to run the taskkill EVERY time you clicked out of the textbox which is ALL the time so it just keeps popping up a black dos box every 750ms...lol. I know why but now to figure out how to impliment it correctly.
Hopefully we can help each other out and get what Microsoft should have had in there in the first place working.:confused:
 

tj!2k7

Senior Member
Jan 10, 2007
220
43
Try this code for auto popup and autohide...I know it's not perfect and the code might be a bit sloppy (I'm no programmer); overall it seems to be working fairly well.

Depending on your UAC level, it will prompt for permission; this is necessary because admin permission is required in order to kill the TabTip process to hide the keyboard.

Try this and let me know what you think. Hit "Thanks" if you find it useful.

AutoIt
Code:
#RequireAdmin

Global $title,$currentapp, $visible

While 1
	If RegRead('HKLM\SYSTEM\CurrentControlSet\Services\kbdclass\Enum', 'Count') = 1 Then
		AdlibRegister('checkwindow')
		$cursor = MouseGetCursor()
		$title = WinGetTitle('','')
		Sleep(250)
		If $cursor = MouseGetCursor() And $cursor = 5 And $currentapp <> $title And $visible = 0 Then
			$keyboard = ShellExecute('"C:\Program Files\Common Files\microsoft shared\ink\TabTip.exe"')
			$currentapp = WinGetTitle('','')
			$visible =1
		ElseIf $cursor <> 5  And $currentapp <> $title And $visible = 1 Then
			Run(@ComSpec & " /c " & 'taskkill /im tabtip.exe', "", @SW_HIDE) 
			$visible = 0
		EndIf
		$title = WinGetTitle('','')
	EndIf
	AdlibUnRegister('checkwindow')
WEnd

Func checkwindow()
	$title = WinGetTitle('','')
EndFunc


---------- Post added at 04:43 PM ---------- Previous post was at 04:33 PM ----------

Hopefully we can help each other out and get what Microsoft should have had in there in the first place working.:confused:
You'll need some logic to try to figure out when to minimize the keyboard... which is what I'm attempting to do with the $title and $visible variables in my last post.

I haven't had any issues in Metro with my AutoIt script.. any apps in particular?
 
Last edited:

docfreed

Senior Member
Jun 6, 2009
912
168
Try this code for auto popup and autohide...I know it's not perfect and the code might be a bit sloppy (I'm no programmer); overall it seems to be working fairly well.

Depending on your UAC level, it will prompt for permission; this is necessary because admin permission is required in order to kill the TabTip process to hide the keyboard.

Try this and let me know what you think. Hit "Thanks" if you find it useful.

Code:
#RequireAdmin

Global $title,$currentapp, $visible

While 1
	If RegRead('HKLM\SYSTEM\CurrentControlSet\Services\kbdclass\Enum', 'Count') = 1 Then
		AdlibRegister('checkwindow')
		$cursor = MouseGetCursor()
		$title = WinGetTitle('','')
		Sleep(250)
		If $cursor = MouseGetCursor() And $cursor = 5 And $currentapp <> $title And $visible = 0 Then
			$keyboard = ShellExecute('"C:\Program Files\Common Files\microsoft shared\ink\TabTip.exe"')
			$currentapp = WinGetTitle('','')
			$visible =1
		ElseIf $cursor <> 5  And $currentapp <> $title And $visible = 1 Then
			Run(@ComSpec & " /c " & 'taskkill /im tabtip.exe', "", @SW_HIDE) 
			$visible = 0
		EndIf
		$title = WinGetTitle('','')
	EndIf
	AdlibUnRegister('checkwindow')
WEnd

Func checkwindow()
	$title = WinGetTitle('','')
EndFunc


---------- Post added at 04:43 PM ---------- Previous post was at 04:33 PM ----------

You'll need some logic to try to figure out when to minimize the keyboard... which is what I'm attempting to do with the $title and $visible variables in my last post.

I haven't had any issues in Metro with my AutoIt script.. any apps in particular?
Is this script an AutoIt script or an AutoHotKey script - reason I ask is I also browse over on tabletpcreview - some folks are also working on this and have come up with a similar script at: http://forum.tabletpcreview.com/samsung/54862-my-fix-keyboard-popup-desktop-mode.html
I am not skilled enough to interpret this but maybe some one more experienced could get something useful.
 

scottdw

Member
Jul 18, 2007
20
6
This one is Autoit. The one over at TabletReview I posted after I had a different one from tj!2k7 here converted to AHK. tj!2k7 is the mastermind I just added a little to it :)

---------- Post added at 07:08 PM ---------- Previous post was at 06:49 PM ----------

I haven't had any issues in Metro with my AutoIt script.. any apps in particular?

If i were to go into IE in Metro and click a text field, the keyboard would popup and often stay up with no way to minimize it. I didnt need it in Metro anyway since Metro seems to handle the keyboard the way we are trying to in "Desktop" mode :D

I will see what i can do with the code you posted....thanks for posting it.
 
  • Like
Reactions: fabian-m

tj!2k7

Senior Member
Jan 10, 2007
220
43
Is this script an AutoIt script or an AutoHotKey script - reason I ask is I also browse over on tabletpcreview - some folks are also working on this and have come up with a similar script at: http://forum.tabletpcreview.com/samsung/54862-my-fix-keyboard-popup-desktop-mode.html
I am not skilled enough to interpret this but maybe some one more experienced could get something useful.

My scripts are AutoIt, sorry; I will specify this more clearlyin the future.
 

jonthe838

Senior Member
Nov 14, 2010
129
14
Gothenburg
Try this code for auto popup and autohide...I know it's not perfect and the code might be a bit sloppy (I'm no programmer); overall it seems to be working fairly well.

Depending on your UAC level, it will prompt for permission; this is necessary because admin permission is required in order to kill the TabTip process to hide the keyboard.

Try this and let me know what you think. Hit "Thanks" if you find it useful.

AutoIt
Code:
#RequireAdmin

Global $title,$currentapp, $visible

While 1
	If RegRead('HKLM\SYSTEM\CurrentControlSet\Services\kbdclass\Enum', 'Count') = 1 Then
		AdlibRegister('checkwindow')
		$cursor = MouseGetCursor()
		$title = WinGetTitle('','')
		Sleep(250)
		If $cursor = MouseGetCursor() And $cursor = 5 And $currentapp <> $title And $visible = 0 Then
			$keyboard = ShellExecute('"C:\Program Files\Common Files\microsoft shared\ink\TabTip.exe"')
			$currentapp = WinGetTitle('','')
			$visible =1
		ElseIf $cursor <> 5  And $currentapp <> $title And $visible = 1 Then
			Run(@ComSpec & " /c " & 'taskkill /im tabtip.exe', "", @SW_HIDE) 
			$visible = 0
		EndIf
		$title = WinGetTitle('','')
	EndIf
	AdlibUnRegister('checkwindow')
WEnd

Func checkwindow()
	$title = WinGetTitle('','')
EndFunc


---------- Post added at 04:43 PM ---------- Previous post was at 04:33 PM ----------

You'll need some logic to try to figure out when to minimize the keyboard... which is what I'm attempting to do with the $title and $visible variables in my last post.

I haven't had any issues in Metro with my AutoIt script.. any apps in particular?

Thanks for the script but I really can't get it to work.I've done everything you guys have said but it still won't work..
 

docfreed

Senior Member
Jun 6, 2009
912
168
Thanks for the script but I really can't get it to work.I've done everything you guys have said but it still won't work..
There's a backslash missing in the line reading "Common Files\Microsoft shared\ink" - should be between Microsoft and shared so it reads "Common Files\Microsoft\shared\ink though this may not be the issue - I had a problem also with this script.

Separately, I wonder if Nircmd.exe might be used for this activity - I have had great success making neat short cuts that Microsoft left out - e.g., Sleep. I just do not know how to configure tabtip.exe for automatic ops.
 

tj!2k7

Senior Member
Jan 10, 2007
220
43
thanks for the info but it still wont work for me. I'm running w8 on my acer w700. I run the avript and everything but nothing happens except a bunch of tasks that eat away on my memory

Thanks for the script but I really can't get it to work.I've done everything you guys have said but it still won't work..

Sorry to hear you're having trouble. I'm not familiar with the w700; are you using it with an external keyboard or keyboard dock? If so, that would explain why the script doesn't do anything.

Download the attached AutoIt script, remove the .txt extension, run it, and let me know if it works or what happens. What are the tasks you refer to in that first post?
 

Attachments

  • keyboard.au3.txt
    809 bytes · Views: 450
Last edited:
  • Like
Reactions: fabian-m

netham45

Inactive Recognized Developer
Jun 24, 2009
886
569
Denver
Here's what I came up with.


Bit sloppy, I wrote it like a week ago at 2 AM.

The main issue is that I can't tell when a textbox is activated in Internet Explorer with this method (Or Chrome or FF, for that matter), due to the way the sandboxing works.
Code:
#include <iostream>
#include <Windows.h>
HWND RemoteGetFocus();
int main()
{
	BOOL isKeyboardUp = false;
	system("taskkill /im \"TabTip.exe\" 1>nul 2>nul");
	HWND hwnd;
	HWND lastHwnd = 0;
	while (true)
	{
		Sleep(250);
		hwnd = RemoteGetFocus();
		if (hwnd == lastHwnd)
			continue;
		lastHwnd = hwnd;
		TCHAR className[MAX_PATH];
		GetClassName(hwnd, className, sizeof(className));
		printf("Got hwnd: %p classname: %s\n",hwnd,className);
		if (hwnd && 
			((strcmp(className,"Edit") == 0) || //Most system classnames
			(strcmp(className,"_WwG") == 0) || //Word
			(strcmp(className,"Scintilla") == 0))&&  //Notepad++
			!isKeyboardUp)
		{
			system("\"C:\\Program Files\\Common Files\\Microsoft Shared\\ink\\TabTip.exe\"");
			isKeyboardUp=true;
		}
		else if (isKeyboardUp)
		{
			system("taskkill /im \"TabTip.exe\" 1>nul 2>nul");
			isKeyboardUp=false;
		}
	}
	system("pause");
	return 0;
}

HWND RemoteGetFocus()
{
    HWND hwnd = GetForegroundWindow();
    DWORD remoteThreadId = GetWindowThreadProcessId(hwnd, NULL);
    DWORD currentThreadId = GetCurrentThreadId();
    AttachThreadInput(remoteThreadId, currentThreadId, TRUE);
    HWND focused = GetFocus();
    AttachThreadInput(remoteThreadId, currentThreadId, FALSE);
    return focused;
}
Note: C++, not AutoIt.

Run as admin to use it.
 

Attachments

  • autoKeyboard_x86.zip
    5.6 KB · Views: 718
  • autoKeyboard_Arm.zip
    5.3 KB · Views: 176
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 14
    Updated Build

    In case anyone is still following this thread, here's an updated version for the auto keyboard popup app in desktop mode. I basically took the versions that were posted earlier in this thread and updated to address some of the issues that I was experiencing.

    This is again an AutoIT script (compiled version also attached), but with the following enhancements:

    i. CPU resource usage fixed - it now takes less than 1% cpu on my system, as compared to the original version's 15%

    ii. It does NOT require adminstrator access (I basically use a Windows POST MESSAGE function to hide the keyboard instead of killing it)

    iii. It has a bit more logic in how it determines whether or not to show the keyboard, instead of just using I-Beam cursor. I found that I was getting too many false positives with I-Beam cursor alone, so instead I use a number of different approaches depending on the underlying active application, including specific detection modes for browsers, for Excel cell editing, and then by trapping Window's own BlinkingCursor message. If all this fails, we fallback to the original I-Beam trap.

    Browsers seems to be a bit finicky, but it seems to be working reasonably ok for Firefox Aurora. For Chrome, it was a bit more problematic and so I've included a javascript (copied from someone else!) which basically adds the word "[input]" at the end of the browser title whenever text entry is detected. This is then picked up by the auto popup script to bringup/hide the keyboard.

    To install:
    1. Just copy the "Desktop Keyboard.exe" and the Resources folder somewhere convenient, and put a shortcut to the .exe file in your startup folder.

    2. For the chrome javascript extension, I use Chrome's TamperMonkey add-on to install the script, as the current version of Chrome does not seem to allow for direct installs of javascript extensions as it used to.

    Its still not perfect, but for my own needs (on a Surface Pro 2), it is about as good as it gets without something that is more tightly integrated into the OS. Hope it helps other tablet users!

    ___
    EDIT: Please note that the compiled version included was built on an x64 version of Windows 8.1 and also x64 version of AutoIT 3.3.10.2. If you get a platform error, it could be because you are on 32 bit Windows, in which you would need to recompile in AutoIT.
    4
    Here's what I came up with.


    Bit sloppy, I wrote it like a week ago at 2 AM.

    The main issue is that I can't tell when a textbox is activated in Internet Explorer with this method (Or Chrome or FF, for that matter), due to the way the sandboxing works.
    Code:
    #include <iostream>
    #include <Windows.h>
    HWND RemoteGetFocus();
    int main()
    {
    	BOOL isKeyboardUp = false;
    	system("taskkill /im \"TabTip.exe\" 1>nul 2>nul");
    	HWND hwnd;
    	HWND lastHwnd = 0;
    	while (true)
    	{
    		Sleep(250);
    		hwnd = RemoteGetFocus();
    		if (hwnd == lastHwnd)
    			continue;
    		lastHwnd = hwnd;
    		TCHAR className[MAX_PATH];
    		GetClassName(hwnd, className, sizeof(className));
    		printf("Got hwnd: %p classname: %s\n",hwnd,className);
    		if (hwnd && 
    			((strcmp(className,"Edit") == 0) || //Most system classnames
    			(strcmp(className,"_WwG") == 0) || //Word
    			(strcmp(className,"Scintilla") == 0))&&  //Notepad++
    			!isKeyboardUp)
    		{
    			system("\"C:\\Program Files\\Common Files\\Microsoft Shared\\ink\\TabTip.exe\"");
    			isKeyboardUp=true;
    		}
    		else if (isKeyboardUp)
    		{
    			system("taskkill /im \"TabTip.exe\" 1>nul 2>nul");
    			isKeyboardUp=false;
    		}
    	}
    	system("pause");
    	return 0;
    }
    
    HWND RemoteGetFocus()
    {
        HWND hwnd = GetForegroundWindow();
        DWORD remoteThreadId = GetWindowThreadProcessId(hwnd, NULL);
        DWORD currentThreadId = GetCurrentThreadId();
        AttachThreadInput(remoteThreadId, currentThreadId, TRUE);
        HWND focused = GetFocus();
        AttachThreadInput(remoteThreadId, currentThreadId, FALSE);
        return focused;
    }
    Note: C++, not AutoIt.

    Run as admin to use it.
    4
    Would be nice if anyone upload 32bit version of mod.
    Just I cant compile now :crying:

    Here you have the 32 bit version that I compiled for my tablet.
    3
    Killing the keyboard without a force flag (/f on taskkill) will cause it to minimize properly without closing.
    Can't seem to be able to do that. When I run taskkill /im tabtip.exe
    I receive: ERROR: The process "TabTip.exe" with PID 5300 could not be terminated. Reason: Access is denied.

    Seems to require admin permissions, but appears to work pretty well. Need to figure out a good way to implement this, thanks.

    Hey, this is a good solution! I love it although there is one thing that may be improved. I've noticed that the keyboard will also keep popping in when you are reading a text document. It would be perfect if it wouldn't pop until you reset the focus in that window after closed the first time.

    This code won't let the keyboard pop up again until the window title has changed (switched to another app, browsed to another page, etc.)

    AutoIt
    Code:
    Global $title,$currentapp
    
    While 1
    	If RegRead('HKLM\SYSTEM\CurrentControlSet\Services\kbdclass\Enum', 'Count') = 1 Then
    		AdlibRegister('checkwindow')
    		$cursor = MouseGetCursor()
    		$title = WinGetTitle('','')
    		Sleep(1000)
    		If $cursor = MouseGetCursor() And $cursor = 5 And $currentapp <> $title Then
    			$keyboard = ShellExecute('"C:\Program Files\Common Files\microsoft shared\ink\TabTip.exe"')
    			$currentapp = WinGetTitle('','')
    		EndIf
    	$title = WinGetTitle('','')
    	EndIf
    WEnd
    
    Func checkwindow()
    	$title = WinGetTitle('','')
    EndFunc
    3
    Try this code for auto popup and autohide...I know it's not perfect and the code might be a bit sloppy (I'm no programmer); overall it seems to be working fairly well.

    Depending on your UAC level, it will prompt for permission; this is necessary because admin permission is required in order to kill the TabTip process to hide the keyboard.

    Try this and let me know what you think. Hit "Thanks" if you find it useful.

    AutoIt
    Code:
    #RequireAdmin
    
    Global $title,$currentapp, $visible
    
    While 1
    	If RegRead('HKLM\SYSTEM\CurrentControlSet\Services\kbdclass\Enum', 'Count') = 1 Then
    		AdlibRegister('checkwindow')
    		$cursor = MouseGetCursor()
    		$title = WinGetTitle('','')
    		Sleep(250)
    		If $cursor = MouseGetCursor() And $cursor = 5 And $currentapp <> $title And $visible = 0 Then
    			$keyboard = ShellExecute('"C:\Program Files\Common Files\microsoft shared\ink\TabTip.exe"')
    			$currentapp = WinGetTitle('','')
    			$visible =1
    		ElseIf $cursor <> 5  And $currentapp <> $title And $visible = 1 Then
    			Run(@ComSpec & " /c " & 'taskkill /im tabtip.exe', "", @SW_HIDE) 
    			$visible = 0
    		EndIf
    		$title = WinGetTitle('','')
    	EndIf
    	AdlibUnRegister('checkwindow')
    WEnd
    
    Func checkwindow()
    	$title = WinGetTitle('','')
    EndFunc


    ---------- Post added at 04:43 PM ---------- Previous post was at 04:33 PM ----------

    Hopefully we can help each other out and get what Microsoft should have had in there in the first place working.:confused:
    You'll need some logic to try to figure out when to minimize the keyboard... which is what I'm attempting to do with the $title and $visible variables in my last post.

    I haven't had any issues in Metro with my AutoIt script.. any apps in particular?