wince 6中硬键盘 输入法解决

在一个项目中,我遇到了9宫格的键盘问题;wince下的keyboard的构架是native 方式,往 系统发送的是数字按键,要在wince上实现汉字或字母,就需要一个输入法来解析!
好在T9就是这样设计的,广泛用在嵌入式领域,C51下也有这样的移植。google一下,有很多连接可供下载,编译和集成都非常很简单,启动系统后就有输入法的面板!

需要指出的是,
1,附带的注册表wceshellfe.reg非常的冗余,并且对系统有影响!可以参照我修改后的内容:

; Tell edit controls to use level 3 processing for Chinese Ime's.
; @CESYSGEN IF WCESHELLFE_MODULES_CHSIME98
[HKEY_LOCAL_MACHINE\SYSTEM\GWE\EDIT]
"IMELEVEL"=dword:3
; @CESYSGEN ENDIF


; "DefaultIm"="LOC_MSIM_CLSID"
; @=LOC_SPIMNAME
; @=LOC_PHONIMNAME
; @=LOC_CHAJEIIMNAME


; CHS Input Methods (IM's)
; @CESYSGEN IF WCESHELLFE_MODULES_SPIM
[HKEY_CURRENT_USER\ControlPanel\Sip]
"DefaultIm"="{DF2BF912-1A9A-11D2-8F89-00C04FAC52F9}"

[HKEY_CLASSES_ROOT\CLSID\{DF2BF912-1A9A-11D2-8F89-00C04FAC52F9}]
; @=LOC_SPIMNAME
;@=LOCALIZED_SPIMNAME
[HKEY_CLASSES_ROOT\CLSID\{DF2BF912-1A9A-11D2-8F89-00C04FAC52F9}\InprocServer32]
@="\\windows\\spim.dll"
[HKEY_CLASSES_ROOT\CLSID\{DF2BF912-1A9A-11D2-8F89-00C04FAC52F9}\IsSIPInputMethod]
@="1"
[HKEY_CLASSES_ROOT\CLSID\{DF2BF912-1A9A-11D2-8F89-00C04FAC52F9}\DefaultIcon]
@="\\windows\\spim.dll,0"
; @CESYSGEN ENDIF

; CHT IMs are in COMMON.REG


; @CESYSGEN IF WCESHELLFE_MODULES_MSIMESP
; @CESYSGEN ENDIF


; @CESYSGEN IF WCESHELLFE_MODULES_CHSIME98
;
; Simplified Chinese Intelligent IME (MSPY2)
;
[HKEY_CURRENT_USER\Keyboard Layout\Preload\1]
@="e0010804"
[HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Layouts\e0010804]
"Layout Text"="Intelligent IME 98"
"Ime File"="T9IME.dll"
"Keyboard Layout"="00000409"

;
;for IME hot keys (optional and may be diff due to target)
;
# Hot Key Alt + F1 For direct switch
# IME_HOTKEY_DSWITCH_FIRST
[HKEY_CURRENT_USER\Control Panel\Input Method\Hot Keys\00000100]
"VK"=dword:70
"KM"=dword:C001
"Ime"=dword:e0010804

# Hot Key Ctrl + Space For NO IME switch
# IME_CHOTKEY_IME_NONIME_TOGGLE
# It may be no use because there is only one IME
[HKEY_CURRENT_USER\Control Panel\Input Method\Hot Keys\00000010]
"VK"=dword:20
"KM"=dword:C002
"Ime"=dword:e0010804

# Hot Key Shift + Space For Shape switch
# IME_CHOTKEY_SHAPE_TOGGLE
[HKEY_CURRENT_USER\Control Panel\Input Method\Hot Keys\00000011]
"VK"=dword:20
"KM"=dword:C004
"Ime"=dword:e0010804

# Hot Key Ctrl + . for symbol switch
# IME_CHOTKEY_SYMBOL_TOGGLE
[HKEY_CURRENT_USER\Control Panel\Input Method\Hot Keys\00000012]
"VK"=dword:BE
"KM"=dword:C002
"Ime"=dword:e0010804

[HKEY_CURRENT_USER\Ime\Hot Keys\001]
"Key Modifiers"=dword:11
"Virtual Key"=dword:20

[HKEY_CURRENT_USER\Ime\Hot Keys\002]
"Key Modifiers"=dword:10
"Virtual Key"=dword:20

[HKEY_CURRENT_USER\Ime\Hot Keys\003]
"Key Modifiers"=dword:0
"Virtual Key"=dword:0
; @CESYSGEN ENDIF


; @CESYSGEN IF WCESHELLFE_MODULES_MSIMEPH
; @CESYSGEN ENDIF

2,T9输入法是IME构架,与wince下的SIP构架有很大的不同。与网上有同学遇到样的问题,无法切换到其他的输入法。因为其仅仅是一个输入法,不能在后台运行一个IMM的程序来控制。
3,经过查找wince的catalog,发现wince的feature IMM 没有选择,再选上multilingual user interface,clean sysgen后,已经可以选择其他的输入法了。

posted on 2012-08-05 10:53  王亮1  阅读(168)  评论(0编辑  收藏  举报

导航