Class Index | File Index

Classes


Class orion.KeyStroke

A KeyStroke represents of a key code and modifier state that can be triggered by the user using the keyboard.
Defined in: </jobs/genie.orion/orion-client-stable/workspace/bundles/org.eclipse.orion.client.core/web/orion/keyBinding.js>.

Class Summary
Constructor Attributes Constructor Name and Description
 
orion.KeyStroke(keyCode, mod1, mod2, mod3, mod4, type)
Constructs a new key stroke with the given key code, modifiers and event type.
Field Summary
Field Attributes Field Name and Description
 
The key code.
 
The primary modifier (usually Command on Mac and Control on other platforms).
 
The secondary modifier (usually Shift).
 
The third modifier (usually Alt).
 
The fourth modifier (usually Control on the Mac).
 
The type of event that the keybinding matches; either "keydown" or "keypress"
Method Summary
Method Attributes Method Name and Description
 
equals(kb)
Returns whether this key stroke is the same as the given parameter.
 
 
match(e, index)
Determines either this key stroke matches the specifed event.
Class Detail
orion.KeyStroke(keyCode, mod1, mod2, mod3, mod4, type)
Constructs a new key stroke with the given key code, modifiers and event type.
Parameters:
{String|Number} keyCode
the key code.
{Boolean} mod1
the primary modifier (usually Command on Mac and Control on other platforms).
{Boolean} mod2
the secondary modifier (usually Shift).
{Boolean} mod3
the third modifier (usually Alt).
{Boolean} mod4
the fourth modifier (usually Control on the Mac).
{String} type
the type of event that the keybinding matches; either "keydown" or "keypress".
See:
orion.editor.TextView#setKeyBinding
Field Detail
{String|Number} keyCode
The key code.

{Boolean} mod1
The primary modifier (usually Command on Mac and Control on other platforms).

{Boolean} mod2
The secondary modifier (usually Shift).

{Boolean} mod3
The third modifier (usually Alt).

{Boolean} mod4
The fourth modifier (usually Control on the Mac).

{String} type
The type of event that the keybinding matches; either "keydown" or "keypress"
Default Value:
keydown
Method Detail
{Boolean} equals(kb)
Returns whether this key stroke is the same as the given parameter.
Parameters:
{orion.KeyBinding} kb
the key binding to compare with.
Returns:
{Boolean} whether or not the parameter and the receiver describe the same key binding.

getKeys()

{Boolean} match(e, index)
Determines either this key stroke matches the specifed event. It can match either a a whole sequence of key events or a single key event at a specified index.

KeyStroke only matches single key events. KeySequence handles matching a sequence of events.

TODO explain this better
Parameters:
{DOMEvent|DOMEvent[]} e
the key event or list of events to match.
index
the key event to match.
Returns:
{Boolean} true whether the key binding matches the key event.
See:
orion.KeySequence#match

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Apr 04 2017 10:51:57 GMT-0400 (EDT)