Configure keystroke output and data formatting
Last updated July 26th, 2023
Knox Capture sends scanned data to business apps as keystrokes, imitating the way a user manually enters data using a keyboard.
If you activate a KPE (Knox Platform for Enterprise) Premium license with a Galaxy S20 device in WP-C mode, you must set AdvancedRestrictionPolicy.allowRemoteControl()
to True in your EMM. Enabling this policy allows keystroke output to function as expected.
Keystroke output
Refer to the following settings to modify scanned data and format its output:
Setting | Description | Options | Default |
---|---|---|---|
Send Enter character as | Sets the output format for all existing and appended Enters |
Key event — Sends Enter as a key event. String — Sends Enter as ASCII Line Feed 0x0A. Both String and Key event — Sends Enter as ASCII Line Feed 0x0A and key event. None — Sends no output for Enter. |
None |
Send Tab character as | Sets the output format for all existing and appended Tabs |
Key event — Sends Tab as a key event. String — Sends Tab as ASCII Horizontal Tab 0x09. Both String and Key event — Sends Tab as ASCII Horizontal Tab 0x09 and key event. None — Sends no output for Tab. |
None |
Send Carriage Return character as | Sets the output format for all Carriage Returns |
Key event — Sends Carriage Return as a key event. String — Sends Carriage Return as ASCII Carriage Return 0x0D. Both String and Key event — Sends Carriage Return as ASCII Carriage Return 0x0D and key event. None — Sends no output for Carriage Return. |
None |
Send ASCII Control characters as | Sets the output format for ASCII characters 1-31 |
Key event — Sends ASCII codes 1 through 31 as key events String — Sends ASCII codes 1 through 31 as strings. Both String and Key event — Sends ASCII control characters in both string and key event formats. None — Sends no output for ASCII control characters. |
String |
Send ASCII Printable characters as | Sets the output format for ASCII characters 32-126 |
Key event — Sends ASCII characters 32-126 as key events. This is useful when a text input field, like a password input, requires key events for validation and does not accept pasted strings. String — Sends ASCII printable characters as strings. Both String and Key event — Sends ASCII printable characters as both strings and key events. None — Sends no output for ASCII printable characters. |
String |
Key event delay |
Sets the delay in milliseconds that Knox Capture will wait before sending a key event like Tab. Key events transmit slower than string data, which can cause synchronization problems. If your barcode output is partially cut off, try increasing the key event delay to a higher value. |
[0, Int32 max value] | 0 |
Basic data formatting
Refer to the following basic data formatting information to create rules to add prefixes, suffixes, and append Tab or Enter characters to scanned barcode data before output.
If appending a Tab or Enter key to the data output, you must also select an output option in the Send Tab as or Sent Enter as settings above.
Setting | Description | Default |
---|---|---|
Prefix to data | Prepends a string of characters to the beginning of the scanned data. | None |
Suffix to data | Appends a string of characters to the end of the scanned data. | None |
Append Tab characte | Appends a Tab (ASCII Horizontal Tab character, 0x09) to the end of the scanned barcode data to automate actions like moving to the adjacent cell in a spreadsheet. | OFF |
Append Enter characte | Appends an Enter (ASCII Line Feed character, 0x0A) to the end of the scanned barcode data to automate actions like submitting a form. | OFF |
Send as Hex | Sends the data in hexadecimal format. | OFF |
Advanced data formatting
In Knox Capture, you can add one or more rules that modify data based on certain actions and criteria. These rules convert scanned data into various formats, which are then passed to business apps through keystrokes. To create a rule and configure its actions and criteria:
-
On the Knox Capture home screen, tap on the profile you want to create a rule for.
-
Under Keystroke output and data formatting, tap Advanced data formatting.
-
In the top right corner of the screen, tap +.
-
Enter a name for the rule, then tap Done.
-
Under Set criteria, configure the below settings as needed:
- Barcode type — The types of barcodes that the rule applies to.
- String length — The required length of scanned data to trigger the rule.
- String — A string that must be present for the rule to trigger.
- String position — When the cursor reaches this position in the string, the rule executes.
-
Under Set actions in order, tap Add actions.
-
A popup appears, prompting you to select actions you want to add. See the table below for details on each action. Tap Add when you’re finished.
-
Configure the actions as necessary, then tap < in the top left to return to the rules list.
-
Repeat Steps 3-8 for any additional rules you want to create, then rearrange them in the order they should be executed.
Refer to the advanced data formatting actions below to move the cursor, modify, send, or delay data being sent to business apps.
If you add multiple actions to your rule, you can change the order in which they execute.
Action | Description | Options | Default |
---|---|---|---|
Cursor movement | Sets the cursor to move to a location in the output data. | Skip ahead by characters — Moves the cursor forward by a specific number of characters. | 1 |
Skip back by characters — Moves the cursor backwards by a specific number of characters. | 1 | ||
Skip to start — Moves the cursor to the beginning of the output data. | None | ||
Move ahead to substring — Moves the cursor forward until a specific string is found. | None | ||
Move past substring — Moves the cursor past a specific string in the output data. | None | ||
Data modification | Sets the elements for Knox Capture to add, edit, or remove from the data. | Remove extra spaces — Deletes all but one space between words, and removes any blank space at the beginning and end of the data. | None |
Remove all spaces — Remove all spaces in the data. | None | ||
Remove leading zeros — Remove any zeroes at the beginning of the data. | None | ||
Pad with zeros to the left — Specify the desired length of the output. Knox Capture pads the left side of the string with zeros until the desired length is reached. | 1 | ||
Replace string — Replaces a specific string with a new, specified string. You must specify both strings. | None | ||
Remove characters When sending data, removes a specific number of characters from the given positions. You must provide the start position and the number of characters to remove. |
Start position: 1 Number of characters: 1 |
||
Data sending | Controls a selected amount of data to send to business apps. | Send next characters — Sends a specific number of characters from the current cursor position. | 1 |
Send remaining characters — Sends all data after the current cursor position. | None | ||
Send up to substring — Sends all data up to a specific string. | None | ||
Send pause — Pauses all actions for a specific number of milliseconds (max. 120000). | 50ms | ||
Send string — Sends a specific string when the corresponding rule is triggered. | None | ||
Send cha — Sends a specific ASCII/Unicode character when the corresponding rule is triggered. | 32 |
On this page
Is this page helpful?