Behold the Table Driven Text Service, Part 1 (Starting with a dictionary simple in every way)

by Michael S. Kaplan, published on 2008/01/22 07:16 -08:00, original URI: http://blogs.msdn.com/michkap/archive/2008/01/22/7179223.aspx


Prior posts in the series:

To work with this file, you will want to right-click on the link and save if to a text file, the name should be MSDN_TableTextService_Simple.txt.

Of course you can change the name, but the file actually contain entries that point to the name so be sure to edit the entries if you edit the name.

This dictionary is defined to convert digit characters (1 to 9) to Roman numerals (Ⅰ to Ⅸ) or dingbat circled sans-serif digits (① to ⑨).

Note that result of conversion is not the combination of Latin alphabet characters for making Roman numerals such as double or triple "I" characters, or combination of the "I" and "X" characters. This mapping particular table uses the Unicode Roman numerals which are located at U+2160 to U+2168.

Note that you can actually define them any way you like -- even including the Roman numerals and the Latin script equivalents as different candidates!

The conversion table is one you can see yourself if you open the file and is defined as follows (in part, of course);

[Text]
"1" = "Ⅰ"
"1" = "ⅰ"
"1" = "①"
"2" = "Ⅱ"
"2" = "ⅱ"
"2" = "②"
"3" = "Ⅲ"
"3" = "ⅲ"
"3" = "③"

To add the file to your own Vista or later machine, here are the directions:

1) Use an elevated command prompt!1

2) Copy MSDN_TableTextService_Simple.txt dictionary file to the "%ProgramFiles%\MSDN Sample TIP" directory.

3) Execute the below command (note that the third parameter "RegisterProfile" should be case sensitive).

Rundll32 "%ProgramFiles%\Windows NT\TableTextService\TableTextService.dll" RegisterProfile MSDN_TableTextService_Simple.txt

4) You will see the below confirmation message box, to which you should press "OK":

Okay, now it is available in Vista!

The next thing to do is to enable “MSDN Sample TableTextService (simple)” on your desktop.

Simple steps:

1) Log in to any user account.

2) Check "MSDN Sample TableTextService (simple)" from English (United States) – Keyboard tree in General tab, Add… push button in the Text Services and Input Languages portion of the Regional and Language Options control panel applet, Keyboards and Languages tab, Change keyboards… push button.

And press OK. You will now see it added to your list of Input Languages:

And you will see that you now have the option in your Language Bar under English (United States), and you can choose either one of them:

Now of course the Language Bar contains the locale names there fore me because I have those other input languages installed; if you fon't then you will just see the Language Bar without the locale name there.

I'll set things up that way for the next few screenshots so you can see things both ways....

Now, let's use the "MSDN Sample TableTextService (simple)" IME in application.

1) Run any application. In this case, I'm going to use notepad.

2) Click the Keyboard Layout button on the Language Bar. You can see the pull down menu listing two keyboard layouts:

3) Select the second one which is "MSDN Sample TableTextService (simple)" from the pull down menu. The Language Bar should be changed as below:

4) Press "1" or "2" or any numerical number in notepad. You could see a small window under the caret in notepad with added your typed numerical number. For example, type "1":

5) Press the "Space" key which means to convert your typed character. You will now see a candidate list corresponding to your typed character. In this case, after typing "1" and "Space":

6) For the actual character injection into the application to get your prefered character to notepad, you can move the highlight by up/down arrow keys and press "Enter" key or you can press the left mouse button on your preferred character on candidate list window.

Unfortunately, you can also select a candidate by typing the number on the left. I say unfortunately given the strange interaction between typing numbers and also typing the number used to identify items in a list. We'll talk about how to not have that eb an issue in a future post!

For example, you can type some numerals 1, 2, and 3, then select some Roman numerals and dingbat circled sans-serif digits:

Okay, next up I'll talk about the three kinds of conversion -- and we'll start getting into these files!

 

1 - Please do not skip this step. I have had over two dozen complaints about various TDTS text files failing, and almost every failure was caused by not running the install line from an elevated command prompt.

 

This post brought to you by(U+2460, aka CIRCLED DIGIT ONE)


# Cory Nelson on Tuesday, January 22, 2008 8:22 PM:

Neat.  I would be interested to see more complex ways to format arbitrary text.  For instance, use the IME to do what Word does with smart quotes.

# Sammy on Monday, March 17, 2008 11:03 PM:

This works fine with Notepad and Paint.

However, it does not work in Wordpad and Word 2003:

number directly go into the Wordpad.


Please consider a donation to keep this archive running, maintained and free of advertising.
Donate €20 or more to receive an offline copy of the whole archive including all images.

referenced by

2008/10/21 Behond the Table Driven Text Service, Part 14 (Don't expect too much from numbers)

2008/07/25 Behold the Table Driven Text Service, Part 13 (Sinhalification proclamation!)

2008/06/30 Behold the Table Driven Text Service, Part 12 (The knights who say நீ, redux, #2)

2008/06/21 Back to Sri Lanka (conceptually)

2008/02/25 Behold the Table Driven Text Service, Part 11 (The knights who say நீ, redux, #1)

2008/02/15 Behold the Table Driven Text Service, Part 10 ("Even Jove nods," Atlas shrugged, "so we'll convert their old files, now.")

2008/02/12 Behold the Table Driven Text Service, Part 9 (Will you be content if I tell you how some content can be defined?)

2008/02/11 Behold the Table Driven Text Service, Part 8 (Configuration 'junk in the trunk', part 2)

2008/01/30 Behold the Table Driven Text Service, Part 7 (Configuration 'junk in the trunk', part 1)

2008/01/29 Behold the Table Driven Text Service, Part 6 (it is sufficient to be iconic, aka DaYi, DaYi Aynu!)

2008/01/28 Behold the Table Driven Text Service, Part 5 (All about the language, baby!)

2008/01/25 Behold the Table Driven Text Service, Part 4 (Specifying when to modify, if not how)

2008/01/24 Behold the Table Driven Text Service, Part 3 (Where do keystrokes come in?)

2008/01/23 Behold the Table Driven Text Service, Part 2 (Three ways to convert!)

go to newer or older post, or back to index or month or day