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

by Michael S. Kaplan, published on 2008/02/12 10:16 -05:00, original URI: http://blogs.msdn.com/b/michkap/archive/2008/02/12/7632387.aspx


Prior posts in the series:

It is ironic that after those last two blogs with all of the various configuration settings, thast I m only now getting to the actual settings involving content....

Of course before you can have the content, first you have to point to where all the content is! That is done in the...

Profile section

Profile section should begin as “[Profile]” section name.
In [Profile] section, Table Driven TIP could hany asny or all of the following definitions:

KeystrokeFile = Path and file name value
RadicalFile = Path and file name value
DictionaryFile = Path and file name value
PhraseFile = Path and file name value
PhraseFromKeystroke = Path and file name value
SymbolFile = Path and file name value
DirectInputFile = Path and file name value

Now you could have each of these sections within the very same file, the very file that you have been editing all this time.

Or alternately, you can you have a single file that multiple Table Driven TIPs point to - if in fact your goal is to have multiple TIPs that share different configuration settings. This can obviously be very helpful when there are large sections that might be shared, like in IMEs

Each entry in the section above that is included has it's own section that ha the actual data in it, which I will now cover below....

Keystroke sections

Defines Table Driven TIP’s composition window keystroke data.
In [Keystroke.Composition] section, form is:
Key code value = Function value

Define Table Driven TIP’s candidate window keystroke data.
In [Keystroke.Candidate] section, form is:
Key code value = Function value

Define Table Driven TIP’s candidate window with wildcard search keystroke data.
In [Keystroke.Candidate.Wildcard] section, form is:
Key code value = Function value

The key code value in any of the three of the above sections is basically the VK value, as you have seen in previous samples in earlier sections like  in Part 1.

"Function value" in any of the three of the above sections is defined as follows:

Function Definition Description
INPUT This keystroke is defined as input to Table Driven TIP composition engine
CANCEL_TEXTSTORE_AND_INPUT This keystroke is defined as finalize composition or candidate
MOVE_PAGE_DOWN This keystroke is defined as move one page down on candidate list

Radical section

Radical is not used for any conversion method. This is just redirect display character in reading window from particular keystroke.
In the [Radical] section, the form is"
"Key" = "Char"

Text section

In the [Text] section, the form is:
"Keys" = "Converted string"

Phrase section

In the [Phrase] section, the form is:
"String" = "Phrase 1" , ... , "Phrase N"

Phrase from keystroke section

In the [PhraseFromKeystroke] section, the form is :
"Keys" = "Phrase 1" , ... , "Phrase N"

Symbol section

In the [Symbol] section, the form is:
"Keys" = "Char 1" , ... , "Char N"

Direct input section

In the [DirectInput] section, the form is:
"Key" = "Char"

Now of course you wouldn't always be using every one of these sections (as the earlier samples showed), but they have their uses when you need them. :-)

Next time I'll look at how to convert from some on the old style IMEs if you have been using them in the past and then after that I'll show some examples of these sections in some of the built-in Table Driven TIP profiles in Vista/Server 2008, after which we'll start building some useful profiles for other languages....

 

This post brought to you by ⑧ and(U+2467 and U+2468, aka CIRCLED DIGIT EIGHT and CIRCLED DIGIT NINE)


alee67 on 21 Dec 2012 11:47 AM:

Is there any way that the [Radical] section can also be applied to the keystrokes shown in the candidate window when CandidateList.dontShowNextKeySequence = 0?


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.")

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