X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/0494b8d9b9bb03ab6c22b34dae81261e3cd7e3e6..7a654f8d43fdb43d78b63d90528bed6e86b608cc:/docs/api/Ext.util.KeyNav.html diff --git a/docs/api/Ext.util.KeyNav.html b/docs/api/Ext.util.KeyNav.html new file mode 100644 index 00000000..3c8ada15 --- /dev/null +++ b/docs/api/Ext.util.KeyNav.html @@ -0,0 +1,103 @@ +Ext.util.KeyNav | Ext JS 4.0 Documentation +
For up to date documentation and features, visit +http://docs.sencha.com/ext-js/4-0

Sencha Documentation

+ + + + + +

Provides a convenient wrapper for normalized keyboard navigation. KeyNav allows you to bind +navigation keys to function calls that will get called when the keys are pressed, providing an easy +way to implement custom navigation schemes for any UI component.

+ + +

The following are all of the possible keys that can be implemented: enter, space, left, right, up, down, tab, esc, +pageUp, pageDown, del, backspace, home, end. Usage:

+ + + + +
var nav = new Ext.util.KeyNav("my-element", {
+    "left" : function(e){
+        this.moveLeft(e.ctrlKey);
+    },
+    "right" : function(e){
+        this.moveRight(e.ctrlKey);
+    },
+    "enter" : function(e){
+        this.save();
+    },
+    scope : this
+});
+
+ +
Defined By

Config Options

Other Configs

 
The method to call on the Ext.EventObject after this KeyNav intercepts a key. Valid values are +Ext.EventObject.stopE...

The method to call on the Ext.EventObject after this KeyNav intercepts a key. Valid values are +Ext.EventObject.stopEvent, Ext.EventObject.preventDefault and +Ext.EventObject.stopPropagation (defaults to 'stopEvent')

+
 

True to disable this KeyNav instance (defaults to false)

+

True to disable this KeyNav instance (defaults to false)

+
 
Handle the keydown event instead of keypress (defaults to false). KeyNav automatically does this for IE since +IE doe...

Handle the keydown event instead of keypress (defaults to false). KeyNav automatically does this for IE since +IE does not propagate special keys on keypress, but setting this to true will force other browsers to also +handle keydown instead of keypress.

+
Defined By

Methods

 
KeyNav( +Mixed el, Object config) + : void

 

+

Parameters

  • el : Mixed

    The element to bind to

    +
  • config : Object

    The config

    +

Returns

  • void    +
 
destroy( +Boolean removeEl) + : void

Destroy this KeyNav (this is the same as calling disable).

+

Destroy this KeyNav (this is the same as calling disable).

+

Parameters

  • removeEl : Boolean

    True to remove the element associated with this KeyNav.

    +

Returns

  • void    +
 

Disable this KeyNav

+

Disable this KeyNav

+

Returns

  • void    +
 

Enable this KeyNav

+

Enable this KeyNav

+

Returns

  • void    +
 
getKeyEvent( +Object forceKeyDown) + : String
Determines the event to bind to listen for keys. Depends on the forceKeyDown setting, +as well as the useKeyDown optio...

Determines the event to bind to listen for keys. Depends on the forceKeyDown setting, +as well as the useKeyDown option on the EventManager.

+

Parameters

  • forceKeyDown : Object
    +

Returns

  • String   

    The type of event to listen for.

    +
 
setDisabled( +Boolean disabled) + : void

Convenience function for setting disabled/enabled by boolean.

+

Convenience function for setting disabled/enabled by boolean.

+

Parameters

  • disabled : Boolean
    +

Returns

  • void    +
\ No newline at end of file