Upgrade to ExtJS 4.0.2 - Released 06/09/2011
[extjs.git] / docs / output / Ext.util.KeyMap.js
1 Ext.data.JsonP.Ext_util_KeyMap({
2   "allMixins": [
3
4   ],
5   "deprecated": null,
6   "docauthor": null,
7   "members": {
8     "cfg": [
9
10     ],
11     "method": [
12       {
13         "deprecated": null,
14         "alias": null,
15         "href": "KeyMap.html#Ext-util-KeyMap-method-constructor",
16         "tagname": "method",
17         "protected": false,
18         "shortDoc": "Creates new KeyMap. ...",
19         "static": false,
20         "params": [
21           {
22             "type": "Mixed",
23             "optional": false,
24             "doc": "<p>The element to bind to</p>\n",
25             "name": "el"
26           },
27           {
28             "type": "Object",
29             "optional": false,
30             "doc": "<p>The binding (see <a href=\"#/api/Ext.util.KeyMap-method-addBinding\" rel=\"Ext.util.KeyMap-method-addBinding\" class=\"docClass\">addBinding</a>)</p>\n",
31             "name": "binding"
32           },
33           {
34             "type": "String",
35             "optional": true,
36             "doc": "<p>(optional) The event to bind to (defaults to \"keydown\")</p>\n",
37             "name": "eventName"
38           }
39         ],
40         "private": false,
41         "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/util/KeyMap.js",
42         "doc": "<p>Creates new KeyMap.</p>\n",
43         "owner": "Ext.util.KeyMap",
44         "name": "KeyMap",
45         "html_filename": "KeyMap.html",
46         "return": {
47           "type": "Object",
48           "doc": "\n"
49         },
50         "linenr": 46
51       },
52       {
53         "deprecated": null,
54         "alias": null,
55         "protected": false,
56         "tagname": "method",
57         "href": "KeyMap.html#Ext-util-KeyMap-method-addBinding",
58         "shortDoc": "Add a new binding to this KeyMap. ...",
59         "static": false,
60         "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/util/KeyMap.js",
61         "private": false,
62         "params": [
63           {
64             "type": "Object/Array",
65             "optional": false,
66             "doc": "<p>A single KeyMap config or an array of configs</p>\n",
67             "name": "binding"
68           }
69         ],
70         "name": "addBinding",
71         "owner": "Ext.util.KeyMap",
72         "doc": "<p>Add a new binding to this KeyMap. The following config object properties are supported:</p>\n\n<pre>Property            Type             Description\n----------          ---------------  ----------------------------------------------------------------------\nkey                 String/Array     A single keycode or an array of keycodes to handle\nshift               Boolean          True to handle key only when shift is pressed, False to handle the key only when shift is not pressed (defaults to undefined)\nctrl                Boolean          True to handle key only when ctrl is pressed, False to handle the key only when ctrl is not pressed (defaults to undefined)\nalt                 Boolean          True to handle key only when alt is pressed, False to handle the key only when alt is not pressed (defaults to undefined)\nhandler             Function         The function to call when KeyMap finds the expected key combination\nfn                  Function         Alias of handler (for backwards-compatibility)\nscope               Object           The scope of the callback function\ndefaultEventAction  String           A default action to apply to the event. Possible values are: stopEvent, stopPropagation, preventDefault. If no value is set no action is performed. \n</pre>\n\n\n<p>Usage:</p>\n\n<pre><code>// Create a KeyMap\nvar map = new Ext.util.KeyMap(document, {\n    key: Ext.EventObject.ENTER,\n    fn: handleKey,\n    scope: this\n});\n\n//Add a new binding to the existing KeyMap later\nmap.addBinding({\n    key: 'abc',\n    shift: true,\n    fn: handleKey,\n    scope: this\n});\n</code></pre>\n\n",
73         "linenr": 68,
74         "return": {
75           "type": "void",
76           "doc": "\n"
77         },
78         "html_filename": "KeyMap.html"
79       },
80       {
81         "deprecated": null,
82         "alias": null,
83         "protected": false,
84         "tagname": "method",
85         "href": "Base3.html#Ext-Base-method-addStatics",
86         "shortDoc": "Add / override static properties of this class. ...",
87         "static": true,
88         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
89         "private": false,
90         "params": [
91           {
92             "type": "Object",
93             "optional": false,
94             "doc": "\n",
95             "name": "members"
96           }
97         ],
98         "name": "addStatics",
99         "owner": "Ext.Base",
100         "doc": "<p>Add / override static properties of this class.</p>\n\n<pre><code>Ext.define('My.cool.Class', {\n    ...\n});\n\nMy.cool.Class.addStatics({\n    someProperty: 'someValue',      // My.cool.Class.someProperty = 'someValue'\n    method1: function() { ... },    // My.cool.Class.method1 = function() { ... };\n    method2: function() { ... }     // My.cool.Class.method2 = function() { ... };\n});\n</code></pre>\n",
101         "linenr": 388,
102         "return": {
103           "type": "Ext.Base",
104           "doc": "<p>this</p>\n"
105         },
106         "html_filename": "Base3.html"
107       },
108       {
109         "deprecated": null,
110         "alias": null,
111         "protected": false,
112         "tagname": "method",
113         "href": "Base3.html#Ext-Base-method-callOverridden",
114         "shortDoc": "Call the original method that was previously overridden with Ext.Base.override\n\nExt.define('My.Cat', {\n    constructo...",
115         "static": false,
116         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
117         "private": false,
118         "params": [
119           {
120             "type": "Array/Arguments",
121             "optional": false,
122             "doc": "<p>The arguments, either an array or the <code>arguments</code> object</p>\n",
123             "name": "args"
124           }
125         ],
126         "name": "callOverridden",
127         "owner": "Ext.Base",
128         "doc": "<p>Call the original method that was previously overridden with <a href=\"#/api/Ext.Base-method-override\" rel=\"Ext.Base-method-override\" class=\"docClass\">Ext.Base.override</a></p>\n\n<pre><code>Ext.define('My.Cat', {\n    constructor: function() {\n        alert(\"I'm a cat!\");\n\n        return this;\n    }\n});\n\nMy.Cat.override({\n    constructor: function() {\n        alert(\"I'm going to be a cat!\");\n\n        var instance = this.callOverridden();\n\n        alert(\"Meeeeoooowwww\");\n\n        return instance;\n    }\n});\n\nvar kitty = new My.Cat(); // alerts \"I'm going to be a cat!\"\n                          // alerts \"I'm a cat!\"\n                          // alerts \"Meeeeoooowwww\"\n</code></pre>\n",
129         "linenr": 269,
130         "return": {
131           "type": "Mixed",
132           "doc": "<p>Returns the result after calling the overridden method</p>\n"
133         },
134         "html_filename": "Base3.html"
135       },
136       {
137         "deprecated": null,
138         "alias": null,
139         "protected": true,
140         "tagname": "method",
141         "href": "Base3.html#Ext-Base-method-callParent",
142         "shortDoc": "Call the parent's overridden method. ...",
143         "static": false,
144         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
145         "private": false,
146         "params": [
147           {
148             "type": "Array/Arguments",
149             "optional": false,
150             "doc": "<p>The arguments, either an array or the <code>arguments</code> object\nfrom the current method, for example: <code>this.callParent(arguments)</code></p>\n",
151             "name": "args"
152           }
153         ],
154         "name": "callParent",
155         "owner": "Ext.Base",
156         "doc": "<p>Call the parent's overridden method. For example:</p>\n\n<pre><code>Ext.define('My.own.A', {\n    constructor: function(test) {\n        alert(test);\n    }\n});\n\nExt.define('My.own.B', {\n    extend: 'My.own.A',\n\n    constructor: function(test) {\n        alert(test);\n\n        this.callParent([test + 1]);\n    }\n});\n\nExt.define('My.own.C', {\n    extend: 'My.own.B',\n\n    constructor: function() {\n        alert(\"Going to call parent's overriden constructor...\");\n\n        this.callParent(arguments);\n    }\n});\n\nvar a = new My.own.A(1); // alerts '1'\nvar b = new My.own.B(1); // alerts '1', then alerts '2'\nvar c = new My.own.C(2); // alerts \"Going to call parent's overriden constructor...\"\n                         // alerts '2', then alerts '3'\n</code></pre>\n",
157         "linenr": 124,
158         "return": {
159           "type": "Mixed",
160           "doc": "<p>Returns the result from the superclass' method</p>\n"
161         },
162         "html_filename": "Base3.html"
163       },
164       {
165         "deprecated": null,
166         "alias": null,
167         "protected": false,
168         "tagname": "method",
169         "href": "Base3.html#Ext-Base-method-create",
170         "shortDoc": "Create a new instance of this Class. ...",
171         "static": true,
172         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
173         "private": false,
174         "params": [
175
176         ],
177         "name": "create",
178         "owner": "Ext.Base",
179         "doc": "<p>Create a new instance of this Class.</p>\n\n<pre><code>Ext.define('My.cool.Class', {\n    ...\n});\n\nMy.cool.Class.create({\n    someConfig: true\n});\n</code></pre>\n\n<p>All parameters are passed to the constructor of the class.</p>\n",
180         "linenr": 329,
181         "return": {
182           "type": "Object",
183           "doc": "<p>the created instance.</p>\n"
184         },
185         "html_filename": "Base3.html"
186       },
187       {
188         "deprecated": null,
189         "alias": null,
190         "protected": false,
191         "tagname": "method",
192         "href": "Base3.html#Ext-Base-method-createAlias",
193         "shortDoc": "Create aliases for existing prototype methods. ...",
194         "static": true,
195         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
196         "private": false,
197         "params": [
198           {
199             "type": "String/Object",
200             "optional": false,
201             "doc": "<p>The new method name, or an object to set multiple aliases. See\n<a href=\"#/api/Ext.Function-method-flexSetter\" rel=\"Ext.Function-method-flexSetter\" class=\"docClass\">flexSetter</a></p>\n",
202             "name": "alias"
203           },
204           {
205             "type": "String/Object",
206             "optional": false,
207             "doc": "<p>The original method name</p>\n",
208             "name": "origin"
209           }
210         ],
211         "name": "createAlias",
212         "owner": "Ext.Base",
213         "doc": "<p>Create aliases for existing prototype methods. Example:</p>\n\n<pre><code>Ext.define('My.cool.Class', {\n    method1: function() { ... },\n    method2: function() { ... }\n});\n\nvar test = new My.cool.Class();\n\nMy.cool.Class.createAlias({\n    method3: 'method1',\n    method4: 'method2'\n});\n\ntest.method3(); // test.method1()\n\nMy.cool.Class.createAlias('method5', 'method3');\n\ntest.method5(); // test.method3() -&gt; test.method1()\n</code></pre>\n",
214         "linenr": 648,
215         "return": {
216           "type": "void",
217           "doc": "\n"
218         },
219         "html_filename": "Base3.html"
220       },
221       {
222         "deprecated": null,
223         "alias": null,
224         "protected": false,
225         "tagname": "method",
226         "href": "KeyMap.html#Ext-util-KeyMap-method-destroy",
227         "shortDoc": "Destroys the KeyMap instance and removes all handlers. ...",
228         "static": false,
229         "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/util/KeyMap.js",
230         "private": false,
231         "params": [
232           {
233             "type": "Boolean",
234             "optional": false,
235             "doc": "<p>True to also remove the attached element</p>\n",
236             "name": "removeEl"
237           }
238         ],
239         "name": "destroy",
240         "owner": "Ext.util.KeyMap",
241         "doc": "<p>Destroys the KeyMap instance and removes all handlers.</p>\n",
242         "linenr": 297,
243         "return": {
244           "type": "void",
245           "doc": "\n"
246         },
247         "html_filename": "KeyMap.html"
248       },
249       {
250         "deprecated": null,
251         "alias": null,
252         "protected": false,
253         "tagname": "method",
254         "href": "KeyMap.html#Ext-util-KeyMap-method-disable",
255         "shortDoc": "Disable this KeyMap ...",
256         "static": false,
257         "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/util/KeyMap.js",
258         "private": false,
259         "params": [
260
261         ],
262         "name": "disable",
263         "owner": "Ext.util.KeyMap",
264         "doc": "<p>Disable this KeyMap</p>\n",
265         "linenr": 275,
266         "return": {
267           "type": "void",
268           "doc": "\n"
269         },
270         "html_filename": "KeyMap.html"
271       },
272       {
273         "deprecated": null,
274         "alias": null,
275         "protected": false,
276         "tagname": "method",
277         "href": "KeyMap.html#Ext-util-KeyMap-method-enable",
278         "shortDoc": "Enables this KeyMap ...",
279         "static": false,
280         "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/util/KeyMap.js",
281         "private": false,
282         "params": [
283
284         ],
285         "name": "enable",
286         "owner": "Ext.util.KeyMap",
287         "doc": "<p>Enables this KeyMap</p>\n",
288         "linenr": 265,
289         "return": {
290           "type": "void",
291           "doc": "\n"
292         },
293         "html_filename": "KeyMap.html"
294       },
295       {
296         "deprecated": null,
297         "alias": null,
298         "protected": false,
299         "tagname": "method",
300         "href": "Base3.html#Ext-Base-method-getName",
301         "shortDoc": "Get the current class' name in string format. ...",
302         "static": false,
303         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
304         "private": false,
305         "params": [
306
307         ],
308         "name": "getName",
309         "owner": "Ext.Base",
310         "doc": "<p>Get the current class' name in string format.</p>\n\n<pre><code>Ext.define('My.cool.Class', {\n    constructor: function() {\n        alert(this.self.getName()); // alerts 'My.cool.Class'\n    }\n});\n\nMy.cool.Class.getName(); // 'My.cool.Class'\n</code></pre>\n",
311         "linenr": 631,
312         "return": {
313           "type": "String",
314           "doc": "<p>className</p>\n"
315         },
316         "html_filename": "Base3.html"
317       },
318       {
319         "deprecated": null,
320         "alias": null,
321         "protected": false,
322         "tagname": "method",
323         "href": "Base3.html#Ext-Base-method-implement",
324         "shortDoc": "Add methods / properties to the prototype of this class. ...",
325         "static": true,
326         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
327         "private": false,
328         "params": [
329           {
330             "type": "Object",
331             "optional": false,
332             "doc": "\n",
333             "name": "members"
334           }
335         ],
336         "name": "implement",
337         "owner": "Ext.Base",
338         "doc": "<p>Add methods / properties to the prototype of this class.</p>\n\n<pre><code>Ext.define('My.awesome.Cat', {\n    constructor: function() {\n        ...\n    }\n});\n\n My.awesome.Cat.implement({\n     meow: function() {\n        alert('Meowww...');\n     }\n });\n\n var kitty = new My.awesome.Cat;\n kitty.meow();\n</code></pre>\n",
339         "linenr": 415,
340         "return": {
341           "type": "void",
342           "doc": "\n"
343         },
344         "html_filename": "Base3.html"
345       },
346       {
347         "deprecated": null,
348         "alias": null,
349         "protected": true,
350         "tagname": "method",
351         "href": "Base3.html#Ext-Base-method-initConfig",
352         "shortDoc": "Initialize configuration for this class. ...",
353         "static": false,
354         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
355         "private": false,
356         "params": [
357           {
358             "type": "Object",
359             "optional": false,
360             "doc": "\n",
361             "name": "config"
362           }
363         ],
364         "name": "initConfig",
365         "owner": "Ext.Base",
366         "doc": "<p>Initialize configuration for this class. a typical example:</p>\n\n<pre><code>Ext.define('My.awesome.Class', {\n    // The default config\n    config: {\n        name: 'Awesome',\n        isAwesome: true\n    },\n\n    constructor: function(config) {\n        this.initConfig(config);\n\n        return this;\n    }\n});\n\nvar awesome = new My.awesome.Class({\n    name: 'Super Awesome'\n});\n\nalert(awesome.getName()); // 'Super Awesome'\n</code></pre>\n",
367         "linenr": 63,
368         "return": {
369           "type": "Object",
370           "doc": "<p>mixins The mixin prototypes as key - value pairs</p>\n"
371         },
372         "html_filename": "Base3.html"
373       },
374       {
375         "deprecated": null,
376         "alias": null,
377         "protected": false,
378         "tagname": "method",
379         "href": "KeyMap.html#Ext-util-KeyMap-method-isEnabled",
380         "shortDoc": "Returns true if this KeyMap is enabled ...",
381         "static": false,
382         "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/util/KeyMap.js",
383         "private": false,
384         "params": [
385
386         ],
387         "name": "isEnabled",
388         "owner": "Ext.util.KeyMap",
389         "doc": "<p>Returns true if this KeyMap is enabled</p>\n",
390         "linenr": 257,
391         "return": {
392           "type": "Boolean",
393           "doc": "\n"
394         },
395         "html_filename": "KeyMap.html"
396       },
397       {
398         "deprecated": null,
399         "alias": null,
400         "protected": false,
401         "tagname": "method",
402         "href": "KeyMap.html#Ext-util-KeyMap-method-on",
403         "shortDoc": "Shorthand for adding a single key listener ...",
404         "static": false,
405         "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/util/KeyMap.js",
406         "private": false,
407         "params": [
408           {
409             "type": "Number/Array/Object",
410             "optional": false,
411             "doc": "<p>Either the numeric key code, array of key codes or an object with the\nfollowing options:\n{key: (number or array), shift: (true/false), ctrl: (true/false), alt: (true/false)}</p>\n",
412             "name": "key"
413           },
414           {
415             "type": "Function",
416             "optional": false,
417             "doc": "<p>The function to call</p>\n",
418             "name": "fn"
419           },
420           {
421             "type": "Object",
422             "optional": true,
423             "doc": "<p>(optional) The scope (<code>this</code> reference) in which the function is executed. Defaults to the browser window.</p>\n",
424             "name": "scope"
425           }
426         ],
427         "name": "on",
428         "owner": "Ext.util.KeyMap",
429         "doc": "<p>Shorthand for adding a single key listener</p>\n",
430         "linenr": 229,
431         "return": {
432           "type": "void",
433           "doc": "\n"
434         },
435         "html_filename": "KeyMap.html"
436       },
437       {
438         "deprecated": null,
439         "alias": null,
440         "protected": false,
441         "tagname": "method",
442         "href": "Base3.html#Ext-Base-method-override",
443         "shortDoc": "Override prototype members of this class. ...",
444         "static": true,
445         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
446         "private": false,
447         "params": [
448           {
449             "type": "Object",
450             "optional": false,
451             "doc": "\n",
452             "name": "members"
453           }
454         ],
455         "name": "override",
456         "owner": "Ext.Base",
457         "doc": "<p>Override prototype members of this class. Overridden methods can be invoked via\n<a href=\"#/api/Ext.Base-method-callOverridden\" rel=\"Ext.Base-method-callOverridden\" class=\"docClass\">Ext.Base.callOverridden</a></p>\n\n<pre><code>Ext.define('My.Cat', {\n    constructor: function() {\n        alert(\"I'm a cat!\");\n\n        return this;\n    }\n});\n\nMy.Cat.override({\n    constructor: function() {\n        alert(\"I'm going to be a cat!\");\n\n        var instance = this.callOverridden();\n\n        alert(\"Meeeeoooowwww\");\n\n        return instance;\n    }\n});\n\nvar kitty = new My.Cat(); // alerts \"I'm going to be a cat!\"\n                          // alerts \"I'm a cat!\"\n                          // alerts \"Meeeeoooowwww\"\n</code></pre>\n",
458         "linenr": 518,
459         "return": {
460           "type": "Ext.Base",
461           "doc": "<p>this</p>\n"
462         },
463         "html_filename": "Base3.html"
464       },
465       {
466         "deprecated": null,
467         "alias": null,
468         "protected": false,
469         "tagname": "method",
470         "href": "KeyMap.html#Ext-util-KeyMap-method-setDisabled",
471         "shortDoc": "Convenience function for setting disabled/enabled by boolean. ...",
472         "static": false,
473         "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/util/KeyMap.js",
474         "private": false,
475         "params": [
476           {
477             "type": "Boolean",
478             "optional": false,
479             "doc": "\n",
480             "name": "disabled"
481           }
482         ],
483         "name": "setDisabled",
484         "owner": "Ext.util.KeyMap",
485         "doc": "<p>Convenience function for setting disabled/enabled by boolean.</p>\n",
486         "linenr": 285,
487         "return": {
488           "type": "void",
489           "doc": "\n"
490         },
491         "html_filename": "KeyMap.html"
492       },
493       {
494         "deprecated": null,
495         "alias": null,
496         "protected": true,
497         "tagname": "method",
498         "href": "Base3.html#Ext-Base-method-statics",
499         "shortDoc": "Get the reference to the class from which this object was instantiated. ...",
500         "static": false,
501         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
502         "private": false,
503         "params": [
504
505         ],
506         "name": "statics",
507         "owner": "Ext.Base",
508         "doc": "<p>Get the reference to the class from which this object was instantiated. Note that unlike <a href=\"#/api/Ext.Base-property-self\" rel=\"Ext.Base-property-self\" class=\"docClass\">Ext.Base.self</a>,\n<code>this.statics()</code> is scope-independent and it always returns the class from which it was called, regardless of what\n<code>this</code> points to during run-time</p>\n\n<pre><code>Ext.define('My.Cat', {\n    statics: {\n        totalCreated: 0,\n        speciesName: 'Cat' // My.Cat.speciesName = 'Cat'\n    },\n\n    constructor: function() {\n        var statics = this.statics();\n\n        alert(statics.speciesName);     // always equals to 'Cat' no matter what 'this' refers to\n                                        // equivalent to: My.Cat.speciesName\n\n        alert(this.self.speciesName);   // dependent on 'this'\n\n        statics.totalCreated++;\n\n        return this;\n    },\n\n    clone: function() {\n        var cloned = new this.self;                      // dependent on 'this'\n\n        cloned.groupName = this.statics().speciesName;   // equivalent to: My.Cat.speciesName\n\n        return cloned;\n    }\n});\n\n\nExt.define('My.SnowLeopard', {\n    extend: 'My.Cat',\n\n    statics: {\n        speciesName: 'Snow Leopard'     // My.SnowLeopard.speciesName = 'Snow Leopard'\n    },\n\n    constructor: function() {\n        this.callParent();\n    }\n});\n\nvar cat = new My.Cat();                 // alerts 'Cat', then alerts 'Cat'\n\nvar snowLeopard = new My.SnowLeopard(); // alerts 'Cat', then alerts 'Snow Leopard'\n\nvar clone = snowLeopard.clone();\nalert(Ext.getClassName(clone));         // alerts 'My.SnowLeopard'\nalert(clone.groupName);                 // alerts 'Cat'\n\nalert(My.Cat.totalCreated);             // alerts 3\n</code></pre>\n",
509         "linenr": 199,
510         "return": {
511           "type": "Class",
512           "doc": "\n"
513         },
514         "html_filename": "Base3.html"
515       }
516     ],
517     "property": [
518       {
519         "type": "Class",
520         "deprecated": null,
521         "alias": null,
522         "protected": true,
523         "tagname": "property",
524         "href": "Base3.html#Ext-Base-property-self",
525         "shortDoc": "Get the reference to the current class from which this object was instantiated. ...",
526         "static": false,
527         "filename": "/mnt/ebs/nightly/git/SDK/platform/core/src/class/Base.js",
528         "private": false,
529         "name": "self",
530         "owner": "Ext.Base",
531         "doc": "<p>Get the reference to the current class from which this object was instantiated. Unlike <a href=\"#/api/Ext.Base-method-statics\" rel=\"Ext.Base-method-statics\" class=\"docClass\">Ext.Base.statics</a>,\n<code>this.self</code> is scope-dependent and it's meant to be used for dynamic inheritance. See <a href=\"#/api/Ext.Base-method-statics\" rel=\"Ext.Base-method-statics\" class=\"docClass\">Ext.Base.statics</a>\nfor a detailed comparison</p>\n\n<pre><code>Ext.define('My.Cat', {\n    statics: {\n        speciesName: 'Cat' // My.Cat.speciesName = 'Cat'\n    },\n\n    constructor: function() {\n        alert(this.self.speciesName); / dependent on 'this'\n\n        return this;\n    },\n\n    clone: function() {\n        return new this.self();\n    }\n});\n\n\nExt.define('My.SnowLeopard', {\n    extend: 'My.Cat',\n    statics: {\n        speciesName: 'Snow Leopard'         // My.SnowLeopard.speciesName = 'Snow Leopard'\n    }\n});\n\nvar cat = new My.Cat();                     // alerts 'Cat'\nvar snowLeopard = new My.SnowLeopard();     // alerts 'Snow Leopard'\n\nvar clone = snowLeopard.clone();\nalert(Ext.getClassName(clone));             // alerts 'My.SnowLeopard'\n</code></pre>\n",
532         "linenr": 18,
533         "html_filename": "Base3.html"
534       }
535     ],
536     "cssVar": [
537
538     ],
539     "cssMixin": [
540
541     ],
542     "event": [
543
544     ]
545   },
546   "singleton": false,
547   "alias": null,
548   "superclasses": [
549     "Ext.Base"
550   ],
551   "protected": false,
552   "tagname": "class",
553   "mixins": [
554
555   ],
556   "href": "KeyMap.html#Ext-util-KeyMap",
557   "subclasses": [
558
559   ],
560   "static": false,
561   "author": null,
562   "component": false,
563   "filename": "/mnt/ebs/nightly/git/SDK/extjs/src/util/KeyMap.js",
564   "private": false,
565   "alternateClassNames": [
566     "Ext.KeyMap"
567   ],
568   "name": "Ext.util.KeyMap",
569   "doc": "<p>Handles mapping keys to actions for an element. One key map can be used for multiple actions.\nThe constructor accepts the same config object as defined by <a href=\"#/api/Ext.util.KeyMap-method-addBinding\" rel=\"Ext.util.KeyMap-method-addBinding\" class=\"docClass\">addBinding</a>.\nIf you bind a callback function to a KeyMap, anytime the KeyMap handles an expected key\ncombination it will call the function with this signature (if the match is a multi-key\ncombination the callback will still be called only once): (String key, <a href=\"#/api/Ext.EventObject\" rel=\"Ext.EventObject\" class=\"docClass\">Ext.EventObject</a> e)\nA KeyMap can also handle a string representation of keys.<br />\nUsage:</p>\n\n<pre><code>// map one key by key code\nvar map = new Ext.util.KeyMap(\"my-element\", {\n    key: 13, // or Ext.EventObject.ENTER\n    fn: myHandler,\n    scope: myObject\n});\n\n// map multiple keys to one action by string\nvar map = new Ext.util.KeyMap(\"my-element\", {\n    key: \"a\\r\\n\\t\",\n    fn: myHandler,\n    scope: myObject\n});\n\n// map multiple keys to multiple actions by strings and array of codes\nvar map = new Ext.util.KeyMap(\"my-element\", [\n    {\n        key: [10,13],\n        fn: function(){ alert(\"Return was pressed\"); }\n    }, {\n        key: \"abc\",\n        fn: function(){ alert('a, b or c was pressed'); }\n    }, {\n        key: \"\\t\",\n        ctrl:true,\n        shift:true,\n        fn: function(){ alert('Control + shift + tab was pressed.'); }\n    }\n]);\n</code></pre>\n\n\n<p><b>Note: A KeyMap starts enabled</b></p>\n",
570   "mixedInto": [
571
572   ],
573   "linenr": 1,
574   "xtypes": [
575
576   ],
577   "html_filename": "KeyMap.html",
578   "extends": "Ext.Base"
579 });