一些重大的概念
Languages
在windows中Language就是指中文,英语,法语,日语等,sublanguages指的是在英语国家中,美国和英国的区别。Languages的概念在应用程序中是用language identifiers来表明的。
A language is a natural language, such as English, French, and Japanese. A sublanguage is a variant of a natural language that is spoken in a specific geographical region, such as the English sublanguages spoken in the United Kingdom and the United States. Applications use values, called language identifiers, to uniquely identify languages and sublanguages.
Locals
这个我理解的不够,大致意思可能就是用来表明键盘是如何输入输出的。
Applications typically use locales to set the language in which input and output is processed. Setting the locale for the keyboard, for example, affects the character values generated by the keyboard. Setting the locale for the display or printer affects the glyphs displayed or printed. Applications set the locale for a keyboard by loading and using keyboard layouts. They set the locale for a display or printer by selecting a font that supports the specified locale.
Keyboard Layouts
键盘布局不仅指定键在键盘上的物理位置,而且还确定通过按这些键生成的字符值。每个键盘布局都有一个句柄来标示布局和语言。
A keyboard layout not only specifies the physical position of the keys on the keyboard but also determines the character values generated by pressing those keys. Each layout identifies the current input language and determines which character values are generated by which keys and key combinations.
Every keyboard layout has a corresponding handle that identifies the layout and language. The low word of the handle is a language identifier. The high word is a device handle, specifying the physical layout, or is zero, indicating a default physical layout. The user can associate any input language with a physical layout. For example, an English-speaking user who very occasionally works in French can set the input language of the keyboard to French without changing the physical layout of the keyboard. This means the user can enter text in French using the familiar English layout.
IMM
IMM是Input Method Manager的缩写。IMM是应用程序通过输入法编辑器(Input method editor(IME))来交互的一个服务(一系列api)。IME(输入法编辑器)允许用户可以通过键盘来输出汉字等语言文字 IMM只在东亚国家启用。
TSF
Text Services Framework (Text Services Framework)
Windows提供了两套输入法框架:Windows xp及之前,是IMM,基于纯函数API的。从Windows xp开始后,windows提供新的输入框架TSF,是基于COM的。到了Windows Vista,Windows 7,所有的应用程序和各种输入控件都是优先使用TSF的实现。但之所以Windows Vista,Windows 7用户还能使用各种基于IMM的输入法,是由于Windows提供了一个组件来将所有TSF的请求转为IMM的API。
虽然TSF会最终取代IMM,但是最新版的win10还是保留两者。
TSF它的目标是提供一套简单通用并易扩展的框架,用于高级文本输入和自然语言处理。一个TSF text service能够提供多语言支持和处理:键盘输入(我们一般讲的输入法),手写识别,语言识别等。
TSF是依赖于IMM的。
https://www.curlybrace.com/words/2010/02/13/ime-functions-fail-from-separate-process/
http://www.wisestudy.cn/opentech/opentech_tsf_understand.html
https://max.book118.com/html/2018/0429/163824395.shtm
https://blog.csdn.net/fishmai/article/details/60756753
https://www.cnblogs.com/yuanxiaoping_21cn_com/p/3705347.html
暂无评论内容