US Key Map API
US Key Map Overview
Provides methods required for measuring the keyboard input such as the latched SHIFT key and retrieving the corresponding character when the SHIFT key is latched. Currently this component only supports the US keyboard layout.
On This Page
Still need help?
Join the infusion-users mailing list and ask your questions there.
Adding a US Key Map Component
Option 1: Typically this component is used as a sub-component of the Keyboard Input.
Adding as sub-component:
keymap: { type: "gpii.firstDiscovery.usKeymap" }
Option 2: Adding as a stand alone component:
var myKeymap = gpii.firstDiscovery.usKeymap(options);
Grades
The base grades used by the US Key Map:
Methods
Method | Description | Parameters |
---|---|---|
| Whether or not the pressed key is a SHIFT key. | |
isLowerCaseLetter | Whether or not the given character is a lower case letter. |
|
canShiftChar | Whether or not the given character has a corresponding character when the SHIFT key is latched. |
|
getShiftedChar | Retrieves the corresponding character when the SHIFT key is latched. | A character |
Dependencies
<script type="text/javascript" src="src/lib/infusion/infusion-custom.js"></script> <script type="text/javascript" src="src/js/keyboardInput.js"></script>