TSF Aware

Dictation, Windows Speech Recognition, and Text Services Framework.

Browse by Tags

Tagged Content List
  • Blog Post: That pesky terminating composition

    If you’re developing a text service for Windows XP, you’ve likely found that your composition gets terminated unexpectedly whenever you have more than one character.  On English, you can avoid terminating your composition by making sure that every character in the composition has the GUID_PROP_COMPOSING...
  • Blog Post: The TSF Samples are Here!

    The TSF samples (long missing from MSDN) have finally been uploaded to the MSDN Code Gallery .  The documentation is also available (in plain-text form) in each sample.  MSDN’s web page should be updated soon to point to the code gallery.
  • Blog Post: Where are the TSF Samples?

    Many people have emailed me asking about the TSF samples on MSDN.  They’re supposed to be on MSDN code gallery, although they don’t appear to be there. They are, however, part of the Windows SDK . After installation, you'll find them in %programfiles%\Microsoft SDKs\Windows\v6.1\Samples\winui\Input...
  • Blog Post: What Isn’t TSF good for?

    Well, for one thing, it’s not that great for grabbing the current selection in the foreground application. There are several problems here: 1) You have to get your text service loaded into the target application. This can be slow. 2) Once your text service is loaded, you can only really work...
  • Blog Post: Categories

    In an earlier post on keyboards , I talked briefly about text service categories.  I'd like to talk more about categories. TSF will make sure that at most one text service in any category is enabled at any given time. So, for example, you can enable one text service with GUID_TFCAT_TIP_KEYBOARD...
  • Blog Post: Oops!

    If you've tried to use the modified version of Scintilla that I described in my MSDN article , you will find that the zipped sources don't actually have the changes that I made. That was my fault; when I was packaging the sources, I had two versions of ScintillaWin.cxx around, and I picked the newer...
  • Blog Post: ITfCompartmentEventSink::OnChange means what it says...

    I got caught by this recently. ITfCompartmentEventSink::OnChange means what it says. If you repeatedly store the same value into a global compartment, the event sinks will not fire. If you store a different value into the compartment, the event sinks fire just fine.
  • Blog Post: Compartment Values

    I've been working with compartments recently, and I've run across a few 'features' that tripped me up. I figure if I've run across them, others have too. Although MSDN says that you can put integers, BSTRs, and interface pointers into a compartment, you can not store interface pointers or strings into...
  • Blog Post: What to do when you push a key

    I received an interesting email the other day asking about how to get the character code from the parameters passed to the ITfKeyEventSink::OnKeyDown method. The answer is that most keyboard related text services only work with a particular keyboard layout, and the text service manages the mapping from...
  • Blog Post: Published!

    You might have noticed that I haven't really talked about text stores on this blog. That's because I've been working on an article for MSDN Magazine on just that very subject. It's in the July 2007 issue, and I just got my copy in the mail, so if you're a subscriber, you can read all the gory details...
  • Blog Post: Generating Candidates from a Text Service

    So how do you create the candidates from within the text service? Well, the first thing you need is the original input, and you need to know what text was created from the original input. Almost all text services (there might be a few that don't do this) place the created text in the document, and attach...
  • Blog Post: Generating Candidates from an Application

    Kirby left a comment to my post on candidates asking when a text service should create an ITfCandidateList. The answer is that when the text service wants to show candidates (via a preserved key or other mechanism), it should show its modal UI, and quite possibly may wish to push a new context so...
  • Blog Post: Text services: Vista Extensions (UI Elements)

    The TSF tour ends here, with a brief discussion of UI Elements in Vista If your text service wishes to be available in full-screen applications like games, it must implement ITfUIElement , and call the ITfUIElementMgr whenever the text service wants to display some UI. (See the discussion of UILess...
  • Blog Post: Text Services: Vista Extensions

    In Windows Vista, TSF added the ability to run in locations where it had previously been disabled. For example, TSF is now available on secure desktops, in full screen (DirectX) applications, and in MTA threads. However, text services have to be aware of these new environments, and must tell TSF that...
  • Blog Post: Text Services: Candidates

    If your text service supports multiple interpretations of the same input, and you wish to allow users to correct the initial interpretation (for dictation, we call this 'correction'; IMEs tend to call it 'reconversion'), your text service will need to implement these interfaces. Your service will also...
  • Blog Post: Text Services: Function Providers

    TSF allows text services to offer optional extension points through the ITfFunctionProvider interface. Indirection through the function provider allows text services to minimize memory usage and startup time by instantiating services when requested, rather than when loaded. Interface ...
  • Blog Post: Text Services: Language Bar

    If your text service wishes to display some UI on the language bar, then your service will need to create objects that implement one (or more) of the following interfaces: Interface How Obtained ITfLangBarItem Pass this base interface to ITfLangBarItemMgr::AddItem...
  • Blog Post: Text Service: Display Attributes

    If your text service wishes to display text in different colors (e.g., displaying the current composition in red), then your text service needs to implement these interfaces: Interface How Obtained ITfDisplayAttributeProvider Obtained by QI from ITfTextInputProcessor...
  • Blog Post: Text Service Properties

    The next thing that I'd like to talk about are properties. While the TSF manager implements basic property handling (via ITfProperty), a text service has the ability to customize the way TSF handles properties. If your text service wishes to attach private information to the inserted text, it can...
  • Blog Post: Text Service Basics

    We have finally finished looking at the interfaces that TSF implements for you. Now we start looking at the interfaces that text services must implement. The first step are the essential interfaces. Every text service must implement these two interfaces. It may optionally implement other interfaces...
  • Blog Post: A Tour through TSF: Miscellaneous Functions

    The last set of interfaces implemented by the TSF manager are the 'odd-ball' interfaces that don't really fall into any other logical groups. Helpers The interfaces in this category provide auxiliary services for applications or text services. Interface How to Obtain ...
  • Blog Post: A Tour through TSF: Language Bar

    These interfaces manage the language bar and the items that display on the language bar. These interfaces are used exclusively by text services, and will be discussed further in a future post. Interface How to Obtain ITfLangBarMgr CoCreateInstance(CLSID_TF_LangBarMgr...
  • Blog Post: A Tour through TSF: Enumerators

    The next set of TSF manager interfaces are the enumerators. These are rather boring interfaces; they just enumerate things. Generally speaking, the enumerators enumerate things owned by the item that provides the enumerator. For example, IEnumTfContexts is returned from ITfDocumentMgr. Therefore,...
  • Blog Post: A Tour through TSF: Event sinks

    The interfaces in this category allow you to be called back when certain events happen on another interface. These callbacks are generally referred to as 'event sinks'. Interface How to Obtain ITfSource QI on ITfThreadMgr , ITfContext , ITfCompartment , ITfInputProcessorProfiles...
  • Blog Post: A Tour through TSF: Contexts and Ranges

    Our next stop on our tour through TSF brings us to the two most heavily used interfaces in text services: Contexts and Ranges. But first, a quick diversion to discuss the relationship between threads, documents, and contexts. The ITfThreadMgr object is the primary object implemented by TSF. TSF ensures...
Page 1 of 2 (32 items) 12