Search
Key Constructor
See Also
 






Initializes a new instance of the Key class.

Namespace: MindFusion.Keyboard
File: Key.js

 Syntax

JavaScript  Copy Code

function Key (config)

 Parameters

config

An object literal whose fields are assigned to respective Key properties.

 Remarks

The Key class is used to create keyboard keys programmatically. It is used by the VirtualKeyboardCreator tool. Objects that are provided as parameters to the constructor specify key code, key type, it's content and location.

 Example

The follwong example shows keys generated by the KeyboardCreator tool:

JavaScript  Copy Code

keys:
[ { 
  code: 144,
  type: "special",
  content: "Num Lock",
  left: 10,
  top: 13,
  width: 40,
  height: 40
 },
 { 
  code: 111,
  type: "numpad",
  content: "",
  left: 55,
  top: 13,
  width: 40,
  height: 40
 },
..........
}

 See Also