将用户输入映射到输入法。 更多...
| import 语句: | import QtQuick.VirtualKeyboard 2.4 | 
| 实例化: | QVirtualKeyboardInputEngine | 
输入引擎负责把输入事件路由到输入法。实际输入逻辑由输入法实现。
输入引擎还包括默认输入法,负责默认处理若活动输入法不处理事件。
| activeKey : int | 
目前按下的键。
| inputMethod : InputMethod | 
Use this property to set the active input method, or to monitor when the active input method changes.
| inputMode : int | 
Use this property to get or set the current input mode. The InputEngine::inputModes property provides the list of valid input modes for the current input method and locale.
The predefined input modes are:
InputEngine.InputMode.Latin
										
										用于拉丁文本的默认输入方式。
									
InputEngine.InputMode.Numeric
										
										Only numeric input is allowed.
									
InputEngine.InputMode.Dialable
										
										Only dialable input is allowed.
									
InputEngine.InputMode.Pinyin
										
										Pinyin input mode for Chinese.
									
InputEngine.InputMode.Cangjie
										
										Cangjie input mode for Chinese.
									
InputEngine.InputMode.Zhuyin
										
										Zhuyin input mode for Chinese.
									
InputEngine.InputMode.Hangul
										
										Hangul input mode for Korean.
									
InputEngine.InputMode.Hiragana
										
										Hiragana input mode for Japanese.
									
InputEngine.InputMode.Katakana
										
										Katakana input mode for Japanese.
									
InputEngine.InputMode.FullwidthLatin
										
										Fullwidth latin input mode for East Asian languages.
									
InputEngine.InputMode.Greek
										
										希腊语输入方式。
									
InputEngine.InputMode.Cyrillic
										
										西里尔输入方式。
									
InputEngine.InputMode.Arabic
										
										阿拉伯语输入方式。
									
InputEngine.InputMode.Hebrew
										
										希伯来语输入方式。
									
InputEngine.InputMode.ChineseHandwriting
										
										Chinese handwriting.
									
InputEngine.InputMode.JapaneseHandwriting
										
										Japanese handwriting.
									
InputEngine.InputMode.KoreanHandwriting
										
										Korean handwriting.
									
InputEngine.InputMode.Thai
										
										泰语输入方式。
									The list of available input modes is dependent on the input method and locale. This property is updated when either of the dependencies change.
The list of available pattern recognition modes.
可能的值:
| 常量 | 描述 | 
|---|---|
| 
InputEngine.PatternRecognitionMode.None
													 | Pattern recognition is not available. | 
| 
InputEngine.PatternRecognitionMode.PatternRecognitionDisabled
													 | 
obsolete
													- Use
None
													代替。 | 
| 
InputEngine.PatternRecognitionMode.Handwriting
													 | Pattern recognition mode for handwriting recognition. | 
| 
InputEngine.PatternRecognitionMode.HandwritingRecoginition
													 | 
obsolete
													- Use
Handwriting
													代替。 | 
该特性在 QtQuick.VirtualKeyboard 2.0 引入。
| previousKey : int | 
先前按下的键。
Use this property to access the list model for the word candidate list.
| wordCandidateListVisibleHint : bool | 
Use this property to check if the word candidate list should be visible in the UI.
| void activeKeyChanged ( int key ) | 
指示活动 key 已改变。
指示输入法已改变。
发射当需要重置输入法时。
注意: 此信号会被自动连接到 QVirtualKeyboardAbstractInputMethod::reset() and InputMethod::reset() when the input method is activated.
注意: 此信号会被自动连接到 QVirtualKeyboardAbstractInputMethod::update() and InputMethod::update() when the input method is activated.
指示输入方式已改变。
指示可用输入方式已改变。
Indicates that the available pattern recognition modes have changed.
The predefined pattern recognition modes are:
InputEngine.PatternRecognitionMode.None
																						
																						Pattern recognition is not available.
																					
InputEngine.PatternRecognitionMode.PatternRecognitionDisabled
																						
																						
obsolete
																						
																						使用
																						
																							InputEngine
																						
																						.PatternRecognitionMode.None
																					
InputEngine.PatternRecognitionMode.Handwriting
																						
																						Pattern recognition mode for handwriting recognition.
																					
InputEngine.PatternRecognitionMode.HandwritingRecoginition
																						
																						
obsolete
																						
																						使用
																						
																							InputEngine
																						
																						.PatternRecognitionMode.Handwriting
																					This signal was introduced in QtQuick.VirtualKeyboard 2.0.
| void previousKeyChanged ( int key ) | 
指示先前 key 已改变。
| void virtualKeyClicked ( int key , string text , int modifiers ) | 
指示虚拟 key was clicked with the given text and modifiers . This signal is emitted after the input method has processed the key event.
| QVirtualKeyboardTrace traceBegin ( int traceId , int patternRecognitionMode , var traceCaptureDeviceInfo , var traceScreenInfo ) | 
采用输入引擎开始跟踪交互。
The trace is uniquely identified by the traceId . The input engine will assign the id to the Trace object if the input method accepts the event.
The patternRecognitionMode specifies the recognition mode used for the pattern.
If the current input method accepts the event it returns a Trace object associated with this interaction. If the input method discards the event, it returns a null value.
The traceCaptureDeviceInfo 提供源设备的有关信息和 traceScreenInfo 提供屏幕上下文的有关信息。
By definition, the Trace object remains valid until the traceEnd() method is called.
The trace interaction is ended by calling the InputEngine.traceEnd() 方法。
This method was introduced in QtQuick.VirtualKeyboard 2.0.
Ends the trace interaction with the input engine.
The trace object may be discarded at any point after calling this function.
The function returns true if the trace interaction was accepted (i.e. the touch events should not be used for anything else).
Reverts the active key state without emitting the key event. This method is useful when the user discards the current key and the key state needs to be restored.
| bool virtualKeyClick ( int key , string text , int modifiers ) | 
																											发射键点击事件为给定
																											
																												key
																											
																											,
																											
																												text
																											
																											and
																											
																												modifiers
																											
																											。返回
																											
true
																											
																											若输入引擎接受键事件。
																										
| bool virtualKeyPress ( int key , string text , int modifiers , bool repeat ) | 
Called by the keyboard layer to indicate that key was pressed, with the given text and modifiers .
The key is set as an active key (down key). The actual key event is triggered when the key is released by the virtualKeyRelease() method. The key press event can be discarded by calling virtualKeyCancel() .
																												The key press also initiates the key repeat timer if
																												
																													repeat
																												
																												is
																												
true
																												
																												.
																											
																												返回
																												
true
																												
																												若此输入引擎接受键。
																											
另请参阅 virtualKeyCancel() and virtualKeyRelease() .
| bool virtualKeyRelease ( int key , string text , int modifiers ) | 
释放键如 key . The method emits a key event for the input method if the event has not been generated by a repeating timer. The text and modifiers are passed to the input method.
																													返回
																													
true
																													
																													若输入引擎接受键。