Windows 8 and Word 2013 are much better adapted to touch controls than Windows 7 and previous Windows operating systems. However, Word 2013 and all the other Office 2013 programs have a very annoying habit of popping up the touch keyboard whenever the touch panel is used. The touch keyboard can cover up to half the screen of the tablet, making it impossible to work using mixed input operations.
The key to solving this annoyance is to either use Touch mode in Office 2013 or disable the Touch Keyboard. The latter is the more effective solution and can be simply done by pulling up the Services console and disabling the Touch Keyboard and Handwriting Panel Service:
- Press ”Win+R”
- Type in ”services.msc”
- Find the ”Touch Keyboard and Handwriting Panel Service”
- Click ”Stop”
The Touch Keyboard can be easily re-enabled by restarting the service or clicking on the Touch Keyboard icon in the Task Bar.
However, the process of always stopping and starting the touch keyboard can be a big hassle. Wouldn’t it be easier to create a simple toggle switch?
The basic functions
It is possible to create shortcuts to start or disable the Touch Keyboard on demand. The basic programs for this can easily be created using the command line interface, notepad, and batch files.
Simply open NotePad, enter one of the following two lines, and save as a ”.BAT” file (e.g., ”StopTouchKeyboard.bat”).
net stop TabletInputService
net start TabletInputService
The ”sc query” command can also be used for a more verbose message instead of the ”net” command, although the command line interface popup is so quick to disappear that neither command’s message can be seen.
The toggle function
However, the above solutions using net stop and net start are very basic, meaning users need two batch files. Why not create a toggle switch? The || (else) command makes this very simple:
net start TabletInputService || net stop TabletInputService
The || operand means that if net start does not successfully execute (because the service is already running), net stop should execute. If the service is not running, net stop will never execute since net start will successfully execute.
There is at least one glaring problem with this method, however. Batch files normally do not have administrative privileges, which can be a problem when activating these services. To run these batch files, users need to right click and select Run as Administrator. One workaround is to download the ”setinacl” tool from Microsoft, which grants programs administrative privileges; another is to download and run tools such as ”Elevated Shortcut”.
Creating an executable
The next step in this program, then, is to change the batch file from a ”.bat” to a ”.exe” executable. This will make it easier to run the program and give it administrative rights. To do this, run the program called ”iexpress.exe” as an administrator. Iexpress is actually a program to create an installer, but it can be used to run batch files. The options to choose are these (you may want to select other options to troubleshoot the installer):
- Open ”iexpress.exe” (as an administrator)
- Select ”Create new Self Extraction Directive file”
- Select ”Extract files and run an installation command”
- Type in the desired program name (i.e. TouchKeyboardToggle)
- Select ”No Prompt” (no installation confirmation)
- Select ”Do not display a license”
- Add the batch file (containing the line net start TabletInputService || net stop TabletInputService)
- Type in this command: “cmd /c “ProgramName.bat” (i.e. cmd /c “TouchKeyboardToggle.bat”)
- Select ”Hidden” (installation window)
- Select ”No message” (no post-installation message)
- Browse for and type in desired program name (i.e. ”C:\Users\UserName\Desktop\TouchKeyboardToggle.exe”) and be sure to select ”Store files using Long File Name inside Package”
- Select ”No restart”
- Select ”Don’t save” (don’t save the SED file to create another iexpress installation executable)
Now the process should be done. Run the new executable as an administrator to test the toggle. It should work, if you avoid some common problems. The following are some errors I ran into while creating the toggle:
- Invalid parameters: If you enable verbose messages (prompts and confirmations), an error will show up when you run the toggle if you do not include quotes around the batch file name in this line: ”cmd /c “ProgramName.bat””. The quotes are very necessary.
- Windows 7 and higher cannot run 16-bit programs: Windows 7 and 8 do not include the ”command” function, but they do include the ”cmd” function. There is a very small, very important difference of 16 bits between the two very similar programs. Be sure to include ”cmd /c” in this line: c”md /c “ProgramName.bat”” instead of simply ”ProgramName.bat” in order to use the 32-bit cmd function.
- Cannot create *.RPT (report) file: If you do not run iexpress as an administrator, the system will not allow it to create certain necessary files, meaning the executable will not be created.
Packaged .bat doesn’t run: If you do not check the ”Store files using Long File Name inside Package” option, the installer might rename the file; when the program runs, it will no longer be able to find the .bat file and nothing will happen.
Giving the program administrative privileges
Now for the final step in the toggle: the administrative rights. It is very easy to bypass the Windows User Account Controls through adjusting UAC settings, creating shortcuts, or creating user tasks. However, the easiest method is probably to simply run the program in compatibility mode with administrative rights always on—this is safe so long as you trust the program. Since this program does very little except turn on and off the Touch Keyboard, there should be no problem with trust, especially if you write it yourself. Simply follow this process:
- Right Click on the .exe
- Click ”Properties”
- Click on the ”Compatibility” tab
- Check ”Run as administrator”
- Click ”OK”
Last, you will probably want to put this program in a nice folder (i.e. ”C:\Program Files\TouchKeyboardToggle\”) and pin a shortcut to it on the task bar for easy access. To create the shortcut, follow this process:
- Right Click on the .exe
- Click ”Create a Shortcut”
- Right Click on the shortcut
- Click ”Rename”
- Rename the shortcut (i.e. TouchKeyboardToggle)
- Press Enter
- Right Click on the shortcut
- Click ”Pin to Taskbar”
To skip all these steps
I have included the Toggle Switch and Shortcut for readers of this blog. You can find the programs and shortcuts [here|http://s.tgmjapan.com/TouchKeyboardToggle] at [TGM Japan|http://www.tgmjapan.com].
However, you will need to edit the shortcut to point to the correct file location, and you will need to add administrative rights to the program. The program may also not work correctly due to idiosyncrasies within the iexpress OS environment.
One last thing to note is that the program, which is technically an installer, may cause Windows to pop up an error message the first time it runs, asking if the program has installed correctly. Click yes and it should not happen again.
To change the Icons
If you want to change the icons to a more attractive icon, see this resource or simply right click on the shortcut.
- CodeBlend and lc at StackOverflow
- Frank at TechNet
- Wataru at TabletPCReview
- Sean van de Riet at YouTube
- Orion at VisualBasicScript
- Mike Morawski and JorgeR at Migee