User Tools

Site Tools


key

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

key [2015/09/18 14:00] (current)
glass created
Line 1: Line 1:
 +====== Key ======
  
 +The key simulates a key on a keyboard by dispatching a keyboard event, containing the assigned character and key unicode values, when touched.
 +
 +
 +{| style="​float:​right;​margin:​0 0 30px 20px;"
 +|+ Two differently customized key elements.
 +|-
 +|{{:​oekey.jpg?​nolink&​400|Key screenshot}}
 +|}
 +
 +{| style=""​
 +!
 +Characteristic
 +!
 +Definition
 +|-
 +| Type || Interactive Display Object
 +|-
 +| Category || Element
 +|-
 +| Scope || Local
 +|-
 +| Position || *
 +|-
 +| Parents || Container
 +|-
 +| Children || none
 +|-
 +| Gestures || none
 +|-
 +| Requirements || none
 +|}
 +
 +
 +{| style=""​
 +!
 +Attribute
 +!
 +Type
 +!
 +Description
 +|-
 +| capsOn || true/false || a flag indicating the "​capitalized"​ state of the text
 +|-
 +| charCode || number || sets the character code (unicode) value of the key 
 +|-
 +| downTextColor || number || the color of the text when touched down
 +|-
 +| icon || object reference || the icon displayed on the key element
 +|-
 +| initTextColor || number || the initial text color
 +|-
 +| keyCode || number || the key code (unicode) value of the key
 +|-
 +| outTextColor || number || the text color when touched out
 +|-
 +| overTextColor || number || the text color when touched over
 +|-
 +| shiftCharCode || number || the character code (unicode) value of the key pressed while in a shift state
 +|-
 +| shiftOn || true/false || the text displayed on the key while in a shift state
 +|-
 +| text || object reference || the text displayed on the key
 +|-
 +| upTextColor || number || the text color when touched up
 +|}
 +
 +See Also: [[Display Attributes]]
 +
 +<​code:​csharp linenums:​1>​
 +<Key id="​ke"​ x="​900"​ y="​255"​ scale="​4"​ initial="​customInit"​ down="​customDown"​ text="​letter"​ downTextColor="​0xFF0000"​ overTextColor="​0x00FF00">​
 +    <Graphic id="​customInit"​ width="​45"​ height="​45"​ shape="​rectangle"​ color="​0xFF0000"/>​
 +    <Graphic id="​customDown"​ width="​45"​ height="​45"​ shape="​rectangle"​ color="​0xFFFFFF"/>​
 +    <Text id="​letter"​ text="​C"​ fontSize="​40"​ textColor="​0xFFFFFF"​ autoSize="​left"​ selectable="​false"​ x="​3"​ y="​-10"/>​
 +</​Key>​
 +</​code>​
key.txt · Last modified: 2015/09/18 14:00 by glass