|
|
/*This file is part of Ext JS 3.4
Copyright (c) 2011-2013 Sencha Inc
Contact: http://www.sencha.com/contact
GNU General Public License UsageThis file may be used under the terms of the GNU General Public License version 3.0 aspublished by the Free Software Foundation and appearing in the file LICENSE included in thepackaging of this file.
Please review the following information to ensure the GNU General Public License version 3.0requirements will be met: http://www.gnu.org/copyleft/gpl.html.
If you are unsure which license is appropriate for your use, please contact the sales departmentat http://www.sencha.com/contact.
Build date: 2013-04-03 15:07:25*/Ext.data.JsonP.Ext_KeyMap({"alternateClassNames":[],"aliases":{},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":null,"uses":[],"html":"<div><pre class=\"hierarchy\"><h4>Files</h4><div class='dependency'><a href='source/KeyMap.html#Ext-KeyMap' target='_blank'>KeyMap.js</a></div></pre><div class='doc-contents'><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.KeyMap-method-addBinding\" rel=\"Ext.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 <a href=\"#!/api/Ext.KeyMap\" rel=\"Ext.KeyMap\" class=\"docClass\">Ext.KeyMap</a>(\"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 <a href=\"#!/api/Ext.KeyMap\" rel=\"Ext.KeyMap\" class=\"docClass\">Ext.KeyMap</a>(\"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 <a href=\"#!/api/Ext.KeyMap\" rel=\"Ext.KeyMap\" class=\"docClass\">Ext.KeyMap</a>(\"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</div><div class='members'><div class='members-section'><div class='definedBy'>Defined By</div><h3 class='members-title icon-property'>Properties</h3><div class='subsection'><div id='property-stopEvent' class='member first-child not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.KeyMap'>Ext.KeyMap</span><br/><a href='source/KeyMap.html#Ext-KeyMap-property-stopEvent' target='_blank' class='view-source'>view source</a></div><a href='#!/api/Ext.KeyMap-property-stopEvent' class='name expandable'>stopEvent</a><span> : Boolean</span></div><div class='description'><div class='short'>True to stop the event from bubbling and prevent the default browser action if the\nkey was handled by the KeyMap (def...</div><div class='long'><p>True to stop the event from bubbling and prevent the default browser action if the\nkey was handled by the KeyMap (defaults to false)</p>\n<p>Defaults to: <code>false</code></p></div></div></div></div></div><div class='members-section'><div class='definedBy'>Defined By</div><h3 class='members-title icon-method'>Methods</h3><div class='subsection'><div id='method-constructor' class='member first-child not-inherited'><a href='#' class='side expandable'><span> </span></a><div class='title'><div class='meta'><span class='defined-in' rel='Ext.KeyMap'>Ext.KeyMap</span><br/><a href='source/KeyMap.html#Ext-KeyMap-method-constructor' target='_blank' class='view-source'>view source</a></div><strong class='new-keyword'>new</strong><a href='#!/api/Ext.KeyMap-method-constructor' class='name expandable'>Ext.KeyMap</a>( <span class='pre'>el, config, [eventName]</span> ) : <a href=\"#!/api/Ext.KeyMap\" rel=\"Ext.KeyMap\" class=\"docClass\">Ext.KeyMap</a></div><div class='description'><div class='short'> ...</div><div class='long'>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>el</span> : Mixed<div class='sub-desc'><p>The element to b
|