Here is a simple example:
Example 24. lz.Keys
<canvas height="140" debug="true">
<handler name="onkeydown" reference="lz.Keys" args="k">
Debug.write("key " + k + " down");
</handler>
<handler name="onkeyup" reference="lz.Keys" args="k">
Debug.write("key " + k + " up");
</handler>
<method name="pressA">
Debug.write("A pressed");
</method>
<handler name="oninit">
del = new LzDelegate(this, "pressA");
lz.Keys.callOnKeyCombo(del, ["A"]);
</handler>
</canvas>
| Name | Type (tag) | Type (js) | Default | Category |
|---|---|---|---|---|
mousewheeldelta
|
Number | Number | 0 | readonly |
| The amount the mouse wheel last moved. Use the onmousewheeldelta event to learn when this value changes. | ||||
classroot, cloneManager, datapath, defaultplacement, id, ignoreplacement, immediateparent, initstage, name, nodeLevel, options, parent, placement, subnodes
Methods
| callOnKeyCombo() |
|---|
| Parameter Name | Type | Description |
|---|---|---|
| d | LzDelegate | The delegate to be called when the keycombo is down. |
| kCArr | Array | Array of strings indicating which keys constitute the keycombo. This array may be in any order. |
| isKeyDown() |
|---|
| Parameter Name | Type | Description |
|---|---|---|
| k | The name of the key to check for downness or an array of key names, e.g. ['shift', 'tab'] |
| removeKeyComboCall() |
|---|
| Parameter Name | Type | Description |
|---|---|---|
| d | LzDelegate | The delegate that was to be called when the keycombo was down. |
| kCArr | Array | An array of strings indicating which keys constituted the keycombo. |
animate, applyConstraint, applyConstraintMethod, applyData, childOf, completeInstantiation, construct, createChildren, dataBindAttribute, destroy, determinePlacement, getAttribute, getOption, getUID, init, lookupSourceLocator, releaseConstraint, releaseConstraintMethod, searchImmediateSubnodes, searchSubnodes, setData, setDatapath, setOption, setSelected, updateData
Events
Copyright © 2002-2008 Laszlo Systems, Inc. All Rights Reserved. Unauthorized use, duplication or distribution is strictly prohibited. This is the proprietary information of Laszlo Systems, Inc. Use is subject to license terms.