如标题所示,我想知道如何使用TVML模板和使用苹果目录项目中的TVJS设计模式来检测键盘输入。
例如:当Search.xml.js显示,用户在键盘上选择'a‘键时,我如何检测到他们选择了'a’键?
发布于 2015-11-04 00:11:21
在深入研究Apple之后,我找到了答案。
以下是键盘onTextChange的参考
下面是一个使用它的例子:
var doc = Presenter.makeDocument(resource);
var searchField = doc.getElementById("SearchField"); //I added an id to the searchField to make it easy to access.
var keyboard = searchField.getFeature("Keyboard");
keyboard.onTextChange = function () {
swiftLog(keyboard.text);
};
https://stackoverflow.com/questions/33509917
复制相似问题