major doc changes
[roojs1] / docs / symbols / Roo.KeyMap.json
index ffb65a0..429accc 100644 (file)
@@ -1,10 +1,15 @@
 {
   "name" : "Roo.KeyMap",
   "augments" : [],
+  "childClasses" : {  },
+  "tree_children" : [],
+  "tree_parent" : [],
   "desc" : "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 {@link #addBinding}.\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, Roo.EventObject e)\nA KeyMap can also handle a string representation of keys.<br />\nUsage:\n <pre><code>\n// map one key by key code\nvar map = new Roo.KeyMap(\"my-element\", {\n    key: 13, // or Roo.EventObject.ENTER\n    fn: myHandler,\n    scope: myObject\n});\n\n// map multiple keys to one action by string\nvar map = new Roo.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 Roo.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<b>Note: A KeyMap starts enabled</b>",
   "isSingleton" : false,
   "isStatic" : false,
   "isBuiltin" : false,
+  "isAbstract" : false,
+  "isBuilderTop" : false,
   "memberOf" : "KeyMap",
   "example" : "",
   "deprecated" : "",
     }
   ],
   "returns" : [],
+  "throws" : "",
+  "requires" : "",
   "config" : [],
   "methods" : [
     {
       "name" : "on",
+      "type" : "function",
       "desc" : "Shorthand for adding a single key listener",
+      "sig" : "(key, fn, scope)",
+      "static" : false,
+      "memberOf" : "",
       "isStatic" : false,
       "isConstructor" : false,
       "isPrivate" : false,
-      "memberOf" : "Roo.KeyMap",
       "example" : "",
       "deprecated" : "",
       "since" : "",
       "see" : "",
+      "exceptions" : "",
+      "requires" : "",
       "params" : [
         {
           "name" : "key",
     },
     {
       "name" : "disable",
+      "type" : "function",
       "desc" : "Disable this KeyMap",
+      "sig" : "()\n{\n\n}",
+      "static" : false,
+      "memberOf" : "",
       "isStatic" : false,
       "isConstructor" : false,
       "isPrivate" : false,
-      "memberOf" : "Roo.KeyMap",
       "example" : "",
       "deprecated" : "",
       "since" : "",
       "see" : "",
+      "exceptions" : "",
+      "requires" : "",
       "params" : [],
       "returns" : []
     },
     {
       "name" : "isEnabled",
+      "type" : "function",
       "desc" : "Returns true if this KeyMap is enabled",
+      "sig" : "()\n{\n\n}",
+      "static" : false,
+      "memberOf" : "",
       "isStatic" : false,
       "isConstructor" : false,
       "isPrivate" : false,
-      "memberOf" : "Roo.KeyMap",
       "example" : "",
       "deprecated" : "",
       "since" : "",
       "see" : "",
+      "exceptions" : "",
+      "requires" : "",
       "params" : [],
       "returns" : [
         {
     },
     {
       "name" : "enable",
+      "type" : "function",
       "desc" : "Enables this KeyMap",
+      "sig" : "()\n{\n\n}",
+      "static" : false,
+      "memberOf" : "",
       "isStatic" : false,
       "isConstructor" : false,
       "isPrivate" : false,
-      "memberOf" : "Roo.KeyMap",
       "example" : "",
       "deprecated" : "",
       "since" : "",
       "see" : "",
+      "exceptions" : "",
+      "requires" : "",
       "params" : [],
       "returns" : []
     },
     {
       "name" : "addBinding",
+      "type" : "function",
       "desc" : "Add a new binding to this KeyMap. The following config object properties are supported:\n<pre>\nProperty    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 (defaults to false)\nctrl        Boolean          True to handle key only when ctrl is pressed (defaults to false)\nalt         Boolean          True to handle key only when alt is pressed (defaults to false)\nfn          Function         The function to call when KeyMap finds the expected key combination\nscope       Object           The scope of the callback function\n</pre>\n\nUsage:\n<pre><code>\n// Create a KeyMap\nvar map = new Roo.KeyMap(document, {\n    key: Roo.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>",
+      "sig" : "(config)",
+      "static" : false,
+      "memberOf" : "",
       "isStatic" : false,
       "isConstructor" : false,
       "isPrivate" : false,
-      "memberOf" : "Roo.KeyMap",
       "example" : "",
       "deprecated" : "",
       "since" : "",
       "see" : "",
+      "exceptions" : "",
+      "requires" : "",
       "params" : [
         {
           "name" : "config",