diff --git a/lib/OpenLayers/Handler/Keyboard.js b/lib/OpenLayers/Handler/Keyboard.js index aa8dda91d2..a10baa1c10 100644 --- a/lib/OpenLayers/Handler/Keyboard.js +++ b/lib/OpenLayers/Handler/Keyboard.js @@ -6,7 +6,9 @@ * @requires OpenLayers/Handler.js * @requires OpenLayers/Events.js * - * Class: OpenLayers.handler.Keyboard + * Class: OpenLayers.handler.Keyboard + * A handler for keyboard events. Create a new instance with the + * constructor. * * Inherits from: * - @@ -16,8 +18,6 @@ OpenLayers.Handler.Keyboard = OpenLayers.Class(OpenLayers.Handler, { /* http://www.quirksmode.org/js/keys.html explains key x-browser key handling quirks in pretty nice detail */ - /* supported named callbacks are: keyup, keydown, keypress */ - /** * Constant: KEY_EVENTS * keydown, keypress, keyup @@ -30,9 +30,22 @@ OpenLayers.Handler.Keyboard = OpenLayers.Class(OpenLayers.Handler, { */ eventListener: null, - /** + /** * Constructor: OpenLayers.Handler.Keyboard - */ + * Returns a new keyboard handler. + * + * Parameters: + * control - {} The control that is making use of + * this handler. If a handler is being used without a control, the + * handlers setMap method must be overridden to deal properly with + * the map. + * callbacks - {Object} An object containing a single function to be + * called when the drag operation is finished. The callback should + * expect to recieve a single argument, the pixel location of the event. + * Callbacks for 'keydown', 'keypress', and 'keyup' are supported. + * options - {Object} Optional object whose properties will be set on the + * handler. + */ initialize: function () { OpenLayers.Handler.prototype.initialize.apply(this, arguments); // cache the bound event listener method so it can be unobserved later