Developers guide

Chapter 20: Trigger Control
Double-Clicks
Psion Teklogix Mobile Devices SDK Developers Guide 183
Ignore duplicate registration flag: When this flag is set during a trigger association attempt, if
the trigger association already exists, no error is returned.
Wants-trigger-events flag: When this flag is set, the consumer receives trigger-down events and
trigger-up events. It does not receive double-click events unless the wants-double-click-events
flag is also set, or there are no consumers registered to receive double-click events.
Wants-double-click-events flag: When this flag is set, the consumer receives double-click
events. To receive single-click events too, the wants-trigger-events flag must also be set.
20.6 Double-Clicks
A double-click occurs when the pistol grip trigger or another trigger source is pressed twice within
a very short time. This time-gap is measured in milliseconds. The double-click time is the
maximum time allowed between the trigger presses if a double-click event is to be generated. The
default double-click time is 0 (zero).
A double-click event is generated when both the following are true:
A trigger source is pressed and released within ½ the configured double-click time, and
The trigger source is pressed a second time before the double-click time expires.
Each trigger source has its own double-click time.
The trigger that is associated with the internal scanner uses the double-click time configured for
the scanner either through the Control Panel or through the SDK scanner namespace. See
“Double-click Settings” on page 90
for more information.
20.7 Events
To receive trigger events, a trigger consumer must be associated with a trigger source and regis-
tered to receive trigger events. A trigger consumer can receive events from several triggers. Each
event contains the identity of the trigger source that originated it. To receive trigger events an ap-
plication must complete the following steps:
1. Register as a trigger consumer.
2. Register the trigger consumer to receive trigger events.
3. Associate the trigger consumer with a trigger source ID.
A trigger consumer can deregister as a trigger consumer to stop receiving all events. It can remove
the association with one, or all, trigger source IDs to stop receiving events from one, or all, trigger
sources.
A trigger event is generated when the state of a trigger source changes on a Psion Teklogix com-
puter. There are two trigger states:
Trigger-down.
Trigger-up.
Trigger-down event: This event is generated when the pistol grip trigger or the button associated
with a trigger source is pressed.
Trigger-up event: This event is generated when the trigger or button associated with a trigger
source is released.
Any trigger event can have one of the following flags set:
Single-click flag.
Double-click flag.