[MOD REQUEST] Auto popup keyboard on desktop

Search This thread

VTEChump

Senior Member
Oct 20, 2011
249
44
Minneapolis
Is there anyway to mod windows 8 so that when you are using a tablet and touch a text entry field in desktop mode the keyboard automatically pops up (even better if it auto closes when you hit enter)? This is the most annoying "feature" of Windows 8 in desktop mode, when using a touch device (tablet).
 

madamimadam

Senior Member
Jan 23, 2011
125
15
Atlanta
it would be pretty sweet if someone could get the same type of auto-keyboard on desktop as in metro. it would remove 25% of my touch
 

SoundSurfer

Senior Member
Jun 11, 2008
63
9
I might be mistaken, but I think in one of the betas the keyboard worked like that on my Acer W500, but not anymore...
 

ra2100

New member
Nov 30, 2006
2
2
I might be mistaken, but I think in one of the betas the keyboard worked like that on my Acer W500, but not anymore...

Yes you are correct in one of the betas it did use to auto popup when you clicked in a text field I remember the same thing with my Samsung Slate 7 now its gone I was just wondering the same thing myself
 
  • Like
Reactions: cozzo

_SpAiK_

Senior Member
Aug 5, 2010
115
7
Yes you are correct in one of the betas it did use to auto popup when you clicked in a text field I remember the same thing with my Samsung Slate 7 now its gone I was just wondering the same thing myself

May this be one of that things that Microsoft disables from registry, but it's still accessible?
 

dragon_76

Senior Member
Apr 21, 2007
618
100
Chicago, IL
I'd be happy if I could get the behaviour from Windows 7 back where when I clicked on a text field there was a floating button for the keyboard next to the input.
 

DJ-VAN

Senior Member
Dec 29, 2010
85
1
Please... I already fixed ff w/ user chrome to make the url bar bigger and tablet friendly.

This is one of the last tweaks I need to do.

I'm sure if the feature can't be re-enabled someone can replicate launching the keyboard automatically with autohotkey?
 

s_kates81

Senior Member
Nov 13, 2005
131
1
Yes please. Can someone do this mid? Its really annoying to manually invoke and dismiss keyboard everytime in desktop mode
 

tj!2k7

Senior Member
Jan 10, 2007
220
43
I second this request!

This lil bit of AutoIt code works pretty well for me to automatically pop up the keyboard..

It polls the mouse cursor every 750ms to see if the cursor is an i-beam, and if so then it launches the keyboard (TabTip.exe).

Code:
While 1
	$cursor = MouseGetCursor()
	If $cursor = 5 Then ShellExecute('"C:\Program Files\Common Files\microsoft shared\ink\TabTip.exe"')
	Sleep(750)
WEnd

Simple, but seems to fulfill my immediate needs for now. Hope you find it useful as well.
 
Last edited:

GoodDayToDie

Inactive Recognized Developer
Jan 20, 2011
6,066
2,933
Seattle
Hmm, I'd never heard of autoit before. Unfortunately, it looks unlikely to run on Windows RT (at least without us getting our hands on the source...) so I wonder if there's a way to do it with one of Windows' several built-in scripting languages...
 

docfreed

Senior Member
Jun 6, 2009
912
168
This lil bit of AutoIt code works pretty well for me to automatically pop up the keyboard..

It polls the mouse cursor every 750ms to see if the cursor is an i-beam, and if so then it launches the keyboard (TabTip.exe).

Code:
While 1
	$cursor = MouseGetCursor()
	If $cursor = 5 Then ShellExecute('"C:\Program Files\Common Files\microsoft shared\ink\TabTip.exe"')
	Sleep(750)
WEnd

Simple, but seems to fulfill my immediate needs for now. Hope you find it useful as well.
Wow - thanks for this! I'm not running RT (traded my Surface RT for a Samsung ATIIV running Win8 Pro that has similar goofy windows 8 issues. So I downloaded AutoIt, ran the script and viola, now my keyboard pops up just like in Windows 7. So to GoodaytoDie (and other devs) I hope you can find a way to port AutoIT to Win RT - it has already saved me many hours of frustration and I am going to donate to the AutoIt team.
 

jonthe838

Senior Member
Nov 14, 2010
129
14
Gothenburg
Wow - thanks for this! I'm not running RT (traded my Surface RT for a Samsung ATIIV running Win8 Pro that has similar goofy windows 8 issues. So I downloaded AutoIt, ran the script and viola, now my keyboard pops up just like in Windows 7. So to GoodaytoDie (and other devs) I hope you can find a way to port AutoIT to Win RT - it has already saved me many hours of frustration and I am going to donate to the AutoIt team.

how did you get it to work? I've never used autoit before and couldn't get it to work so if you could just make a step by step guide for me hehe.
Would be great! Thanks
 

docfreed

Senior Member
Jun 6, 2009
912
168
how did you get it to work? I've never used autoit before and couldn't get it to work so if you could just make a step by step guide for me hehe.
Would be great! Thanks
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.
 
Last edited:
  • Like
Reactions: DBCC

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?