events.KeyEvent Extends goog.events.BrowserEvent
This class is used for the goog.events.KeyHandler.EventType.KEY event and it overrides the key code with the fixed key code.

Inheritance

Object
     goog.Disposable
          goog.events.Event
               goog.events.BrowserEvent
                    goog.events.KeyEvent

Constructor

goog.events.KeyEvent(keyCode, charCode, repeat, browserEvent)

Parameters

keyCode :
The adjusted key code.
charCode :
The unicode character code.
repeat :
Whether this event was generated by keyboard repeat.
browserEvent :
Event
Browser event object.

Instance Methods

Public Protected Private
disposeInternal()
No description.
code »
getBrowserEvent() ⇒
Event
No description.
Returns: 
Event
  The underlying browser event object.
code »
init(e, opt_currentTarget)
Accepts a browser event object and creates a patched, cross browser event object.
Arguments:
e :
Event
Browser event object.
opt_currentTarget :
Current target for event.
code »
isButton(button) ⇒
Tests to see which button was pressed during the event. This is really only useful in IE and Gecko browsers. And in IE, it's only useful for mousedown/mouseup events, because click only fires for the left mouse button. Safari 2 only reports the left button being clicked, and uses the value '1' instead of 0. Opera only reports a mousedown event for the middle button, and no mouse events for the right button. Opera has default behavior for left and middle click that can only be overridden via a configuration setting. There's a nice table of this mess at http://www.unixpapa.com/js/mouse.html.
Arguments:
button :
goog.events.BrowserEvent.MouseButton
The button to test for.
Returns:   True if button was pressed.
code »
preventDefault()
No description.
code »
stopPropagation()
No description.
code »
disposeInternal()
No description.
code »
preventDefault()
No description.
code »
stopPropagation()
No description.
code »
dispose()
No description.
code »
disposeInternal()
Deletes or nulls out any references to COM objects, DOM nodes, or other disposable objects. Classes that extend {@code goog.Disposable} should override this method. For example:
mypackage.MyClass = function() {
goog.Disposable.call(this);
// Constructor logic specific to MyClass.
...
};
goog.inherits(mypackage.MyClass, goog.Disposable);

mypackage.MyClass.prototype.disposeInternal = function() {
mypackage.MyClass.superClass_.disposeInternal.call(this);
// Dispose logic specific to MyClass.
...
};
code »
getDisposed() ⇒
No description.
Returns:   Whether the object has been disposed of.
code »
isDisposed() ⇒
No description.
Returns:   Whether the object has been disposed of.
code »

Instance Properties

altKey :
Whether alt was pressed at time of event.
Code »
button :
Which mouse button was pressed.
Code »
charCode :
Keycode of key press.
Code »
clientX :
X-coordinate relative to the window.
Code »
clientY :
Y-coordinate relative to the window.
Code »
ctrlKey :
Whether control was pressed at time of event.
Code »
event_ :
Event
The browser event object.
Code »
keyCode :
Keycode of key press.
Code »
metaKey :
Whether the meta key was pressed at time of event.
Code »
offsetX :
X-coordinate relative to target.
Code »
offsetY :
Y-coordinate relative to target.
Code »
relatedTarget :
For mouseover and mouseout events, the related object for the event.
Code »
screenX :
X-coordinate relative to the monitor.
Code »
screenY :
Y-coordinate relative to the monitor.
Code »
shiftKey :
Whether shift was pressed at time of event.
Code »
target :
Target that fired the event.
Code »
propagationStopped_ :
Whether to cancel the event in internal capture/bubble processing for IE.
Code »
returnValue_ :
Return value for in internal capture/bubble processing for IE.
Code »
disposed_ :
Whether the object has been disposed of.
Code »

Package events

Package Reference