How to configure keyboard mapping for operations
Since the early days of LS One POS when the POS supported dynakey hardware, functionality to map keyboard strokes to operations has been part of the POS functionality. There is no user interface to configure this keyboard mappings but if the data is present in the underlying tables this functionality works very well.
The way the keyboard mappings work is that any character on the keyboard (with few exceptions - see more information below) can be linked to any operation that can be run from a button on the POS. In order to do this the ASCII value of the character has to be added to a table in addition to which operation should be run when this character is hit on the keyboard.
Here below is an explanation of the table and fields needed to set this up and as well as a link to a SQL script that configures two examples that can be tested.
Hardware profile
First the "keyboard mapping ID" needs to be set in the hardware profile. This needs to be set in field POSHARDWAREPROFILE.KEYBOARDMAPPINGID. The ID can be any string so for the purposes of this example we will enter the value "DEMO".
Keyboard mapping header
The table POSISKEYBOARDMAPPINGTABLE needs to have one row.
Field | Value |
KeyboardMappingID | DEMO |
Description | 'My keyboard mapping' - can be any text |
DataAreaId | usually it's LSR but whatever value was selected when the database was created needs to be set here |
Keyboard mappings
The table POSISKEYBOARDMAPPINGTRANS needs to have one row per keyboard mapping. So to create a mapping that would make the POS void an item by clicking 'a' on the keyboard the following must be added to the table.
Field | Value |
KeyboardMappingID | DEMO |
ASCIIValue | 97 - the ASCII value for the character 'a' |
KeyChar | a - the character itself |
Action | 103 - the ID of the operation itself i.e. Item comment |
ActionProperty | Leave empty - here any parameters that can be set on the operation should be set |
DataAreaId | LSR - usually it's LSR but whatever value was selected when the database was created needs to be set here |
If the Action property would be set f.ex. as "My keyboard mapping in action" then the item comment operation would take that text and add it automatically to the selected item. The same as if a button with the operation Item comment was created with that parameter.
View a SQL script here that creates this example for you in your database, as well as the SQL statement necessary to find the ID's for the POS operations
To see all ASCII values click here
Please note!!!
The characters Delete, Insert, Home, End, Page Up and Page Down cannot be mapped to an operation.
If Backspace is mapped then it will overwrite the backspace of the numpad on the POS layout