Developers guide

Chapter 14: Scanners
Configuring Scanner Properties
90 Psion Teklogix Mobile Devices SDK Developers Guide
The following .NET code sample illustrates how to get and set scanner variables using the setting
key/name methods, and also illustrates how to create a list of all scanner setting index and
key/name pairs.
14.3.1 Configuring Scanner Properties
The following scanner behaviours can be configured using the Mobile Devices SDK:
Double-click settings
Display settings
Beep settings
Logging settings
14.3.1.1 Double-click Settings
A keyboard key and/or a grip trigger can be registered as the trigger for an internal scanner. See
“Keyboard Remapping” on page 56
for information on how to do this. The double-click time for
the trigger associated with the scanner is set as described in this section.
A double-click occurs when the scanner-associated trigger is pressed twice within the period
defined in the Click Time setting. The trigger does not have to be released after the second press
within the Click Time in order for the double-click to register.
Double-clicking has two modes. A method exists for toggling the double-click between these
modes. The modes are as follows:
Scan a bar code.
Send a character to the application.
Scan a bar code mode
In this mode a bar code is scanned in exactly the same way as when the scanner-associated trigger
is pressed once. This is the default setting.
// Create an instance of a ScannerServicesDriver object
PsionTeklogix.Barcode.ScannerServices.ScannerServicesDriver myScanner =
new PsionTeklogix.Barcode.ScannerServices.ScannerServicesDriver();
private void btnGetInfo_Click(object sender, EventArgs e)
{
// Get Click Data and Click Time values
// Note double backslashes due to escape sequence
tbClickData.Text = myScanner.GetProperty("Scs\\Click Data").ToString();
tbClickTime.Text = myScanner.GetProperty("Scs\\Click Time").ToString();
// Cycle through all scanner settings and list the index numbers
// and setting names in a combo box
for (int i = 0; i < myScanner.TotalSettingsCount; i++)
cbScanSetting.Items.Add(i.ToString() + ": "
+ myScanner.GetSettingName(i));
}
private void btnSetInfo_Click(object sender, EventArgs e)
{
// Set Click Data and Click Time values
myScanner.SetProperty("Scs\\Click Data", tbClickData.Text);
myScanner.SetProperty("Scs\\Click Time", int.Parse(tbClickTime.Text));
}