mxDefaultKeyHandlerCodec

Custom codec for configuring mxDefaultKeyHandlers.  This class is created and registered dynamically at load time and used implicitly via mxCodec and the mxCodecRegistry.  This codec only reads configuration data for existing key handlers, it does not encode or create key handlers.

Summary
mxDefaultKeyHandlerCodecCustom codec for configuring mxDefaultKeyHandlers.
Functions
encodeReturns null.
decodeReads a sequence of the following child nodes and attributes:

Functions

encode

codec.encode = function(enc,
obj)

Returns null.

decode

codec.decode = function(dec,
node,
into)

Reads a sequence of the following child nodes and attributes:

Child Nodes

addBinds a keystroke to an actionname.

Attributes

asKeycode.
actionActionname to execute in editor.
controlOptional boolean indicating if the control key must be pressed.

Example

<mxDefaultKeyHandler as="keyHandler">
  <add as="88" control="true" action="cut"/>
  <add as="67" control="true" action="copy"/>
  <add as="86" control="true" action="paste"/>
</mxDefaultKeyHandler>

The keycodes are for the x, c and v keys.

See also: mxDefaultKeyHandler.bindAction, http://www.js-examples.com/page/tutorials__key_codes.html

Binds keycodes to actionnames in an editor.
codec.encode = function(enc,
obj)
Returns null.
codec.decode = function(dec,
node,
into)
Reads a sequence of the following child nodes and attributes:
XML codec for JavaScript object graphs.
Singleton class that acts as a global registry for codecs.
mxDefaultKeyHandler.prototype.bindAction = function (code,
action,
control)
Binds the specified keycode to the given action in editor.
Close