你好,我想按键盘上的事件在键盘上输入。我这样做:按键导航,按键盘上的事件输入键盘上的输入
listeners: {
afterRender: function (thisForm, options) {
this.keyMap = Ext.create(
'Ext.util.KeyMap',
this.el,
[
{
key: 13,
fn: this.submitOnEnter,
scope: this
}
]
);
}
},
submitOnEnter: function (e) {
if (e === 13) {
console.log('some event there!!!')
}
},
但是当我按下回车没有任何反应。
你是否试图将Keylistener添加到窗体或窗体域?你使用的是什么版本的ExtJS?多一点的代码会有所帮助。 – 2014-12-05 19:08:25
我使用分机4.2.1 – user3045654 2014-12-08 12:00:55