UIEvolutin Inc.
UJML Language Reference
<accelerators>

The accelerators element contains the key elements which specify the accelerators of an event element.

UJML Tag Syntax
<accelerators>
    <key>{key-code}</key>
    [...]
<accelerators>

The accelerators element specifies the keys (button clicks) that apply to an event element for a selection event. See Handling Events, Selection Events. The key child element specifies a single key code and may be repeated for as many key codes as needed. See Key Codes.

Contains
Element 
Purpose 
Default Value 
key 
Specifies a key code representing a key click that will cause the containing event to fire. See Key Codes.
Note: This property is repeated for each key code that applies to the containing event element
None 
Is contained by
Element 

How the device maps the buttons to keys and when the accelerator for a key is fired is device dependent. Some devices may activate an accelerator when the button is pressed; others may wait until the key is released. Some devices may also support key 'repeating' where the same accelerator is fired multiple times while a button is held down. You may want to experiment on each device using the events.ujml sample to see how the device works.

The following example shows how to handle the user clicking the 'up' key or using a pointing device to click on the on-screen picture of an 'up' button. In either case it shows a message indicating what happened and flashes the on-screen button. It is part of the events.ujml sample.

<event name="onSelect">
    <accelerators>
        <key>UP</key>
    </accelerators>
    <script>
        showMessage("onSelect: UP");
        flashButton(&BUTTON_UP;);
    </script>
</event>
Copyright (c) 2000-2007 UIEvolution, Inc. All rights reserved.
What do you think about this topic? Send feedback!