Ext JS 4: Bind Keys to a Form

Here is one way to bind a key to a form/component/element in Ext JS 4. The link below also shows examples of key bindings when using MVC.

Ext.define('My.App.QuickFindContainer', {
	extend: 'Ext.container.Container',
	alias: 'widget.quickfindcontainer',
	//all the needed configs, items and initComponent

	afterRender: function () {
		this.nav = Ext.create('Ext.util.KeyNav', this.el, {
			enter : this.doFind,
			scope: this

Helpful links: http://www.sencha.com/forum/showthread.php?131596-Form-submit-on-Enter

Version Info:
Ext JS 4.1.1


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s