输入法编辑器(IME)程序设计(4)

简介:
Candidate Lists
A candidate list is a CANDIDATELIST structure consisting of an array of strings that specifies the characters or character strings that the user may choose from. You can retrieve the candidate lists by using the ImmGetCandidateListCount and ImmGetCandidateList functions.
 
       备选列表是一个CANDIDATELIST结构,这个结构由一个列出用户可从中选取字符(例如汉字)或者字符串(例如词)的字符串数组组成。你可以用ImmGetCandidateListCount ImmGetCandidateList函数来检索备选列表中。
 
Hot Keys
Hot keys give the user a way to quickly change the input mode of the IME or to switch to another IME. Although applications cannot add hot keys to the system, they can initiate the same action as a hot key by using the ImmSimulateHotKey function.
The HexToUnicode IME also permits conversion between hexadecimal and Unicode characters. For an explanation, see HexToUnicode IME.
 
       快捷键(热键)为用户提供了快速改变IME输入状态(例如中/文切换)或选择别的IME(例如从拼音换成五笔)的途径。尽管应用程序不能给系统添加快捷键,但是它可以通过使用ImmSimulateHotKey函数模仿快捷键效果,来启动相同的操作任务。
       HexToUnicode IME还允许十六进制字符与Unicode字符之间的转换。解释请参见HexToUnicode IME
 
HexToUnicode IME
Rich Edit 3.0 supports the HexToUnicode IME, which allows a user to convert between hexadecimal and Unicode characters by using hot keys in one of two ways.
In the first method, the user types the character code in hexadecimal and then types ALT+X. The IME replaces the hexadecimal digits preceding the insertion point with the Unicode character. If the current font does not support the character code, an appropriate font is chosen that does support it. To convert from Unicode to hexadecimal, type SHIFT+ALT+X. This replaces the Unicode character that precedes the insertion point with the hexadecimal digits. In particular, this allows you to determine the character that is indicated by a "missing glyph" indicator. If the hexadecimal character code immediately follows some legitimate (noncharacter) hexadecimal characters, select the specific digits that you want to convert before typing ALT+X. A problem with this first method is that ALT+X is sometimes used as a key combination for the exit command (that is, eXit). For example, in Microsoft Office, this only happens as an option of the File menu.
The second method involves the number pad. Here the user types ALT+NumPad numbers (with values greater than 255) to enter Unicode characters using decimal values. This method is not as useful as the first method because you cannot see what hexadecimal digits you typed. Also, you cannot correct them except by reentering them all again.
 
       Rich Edit 3.0支持HexToUnicode IME,它允许用户使用快捷键通过一两个途径在十六进制字符和Unicode字符之间转换。
       第一个方法中,用户在十六进制模式下输入字符然后输入Alt+X键。IME会用Unicode字符取代插入点前的十六进制编码。如果当前字体不支持此字符的编码,则会选用一个能够支持它的合适字体。要将Unicode字符转换成十六进制字符,输入Shift+Alt+X键即可。这一操作会将插入点前的Unicode字符取代
为十六进制编码。特殊情况下,这一操作允许你自己决定由“缺失字形”指示符所指示的字符。如果十六进制字符代码后紧跟着某些十六进制非字符的代码,那么在输入Alt+X之前应该选择一个你想转换成的特殊字符。第一个方法的问题在于Alt+X往往被当做退出程序的组合键(也就是,eXit)来使用。例如,在Microsoft Office中,它将执行与File菜单中选项(退出选项)相同的功能。
       第二个方法涉及数字键盘。用户可以通过Alt+数字键盘数字(数字必须大于255)的方法用十进制值来输入Unicode字符。因为你看不见你输入的十六进制编码值,这个方法比起第一个方法就稍有逊色了。而且,对于更正而言,除了重新输入你别无选择。




本文转自 水之真谛 51CTO博客,原文链接:http://blog.51cto.com/liutiemeng/18883,如需转载请自行联系原作者
目录
相关文章
|
4月前
|
存储 Linux 编译器
vim编辑器和gcc/g++编辑器的使用讲解
vim编辑器和gcc/g++编辑器的使用讲解
118 2
|
2月前
|
开发工具
vi编辑器,现在vi\vim是文本文件进行编辑的最佳选择,Vim是vi的加强的版本,兼容vi的所有指令,vim编辑器有三种工作模式,一开始进入的是命令模式,命令模式i是插入的意思,两下y+p复制内容
vi编辑器,现在vi\vim是文本文件进行编辑的最佳选择,Vim是vi的加强的版本,兼容vi的所有指令,vim编辑器有三种工作模式,一开始进入的是命令模式,命令模式i是插入的意思,两下y+p复制内容
|
3月前
|
开发工具
Vim 编辑器:高效文本编辑的瑞士军刀
**Vim 概览:** Vim 是一个功能丰富的文本编辑器,以其高度可定制性著称。文章介绍了 Vim 的高效使用技巧,包括快捷打开文件、命令行模式下的常用命令、查找与替换、删除和复制文本。还讨论了配置 `.vimrc` 文件以自定义设置,如改变 leader 键、设置缩进和高亮,并展示了安装插件如 vim-airline 和 vim-snazzy 的方法。通过这些技巧,用户能提升 Vim 使用效率。
40 5
|
3月前
|
Ubuntu 搜索推荐 Linux
Linux的Vim编辑器详解
Linux的Vim编辑器详解
|
2月前
|
Linux 开发工具 数据安全/隐私保护
【linux】如何优雅的使用vim编辑器
【linux】如何优雅的使用vim编辑器