Developer´s Corner | |
HID USB and SPLAT MessagesDownload a printable version of this page here: (HIDUSB.pdf) An X-keys with MacroWorks software provides tremendous versatility for most applications and users, but a developer may need more control of special devices such as jog wheels, knobs, sliders, and other similar input devices. With direct access to the control data, your application gains a far more accurate level of user input. X-keys SPLAT messages are directly available to the developer at the application level. This allows direct access to the X-keys hardware without MacroWorks. The ability to access the actual position data from a jog wheel, for example, has many advantages. The speed that the user spins a wheel can be very fast or extremely slow, and often they need different outcomes at these extremes. Keyboard keystroke emulation has limitations for this type of input and if the application developer has access to the raw data, the program can be optimized to provide the best experience for the user. This is especially important when a developer wants to use a standard input device, such as a joystick or trackball, in a non-standard way. A trackball could be used to change a color value for example and not drive the cursor. Note: SPLAT is not an acronym. It is the sound a toad makes when landing in wet concrete. The original description of our data report format was Special HID Input Terminology, and we found that acronym to be inappropriate. The HID Consumer PageThe USB HID class has defined a complete hierarchy that allows devices to send data based on descriptors to several locations. (keyboard, mouse, joystick, etc.). While standard devices send their data to locations where the OS intercepts and sends it out to the active application, a device can be configured to send data that is not fully recognized by the OS but still managed and stored by the native USB HID drivers. Most operating systems provide a good location for this type of data in the HID Consumer Page. While keyboard, mouse, and joystick locations have dedicated data types and formats, the HID Consumer Page allows for a flexible, vendor defined data format. X-keys SPLAT Messages go to the HID driver on the consumer page. X-keys Modes of OperationX-keys are normally used in one of 3 ways.
There are advantages and disadvantages of each one of these uses. Often an advantage for one application or use may be a disadvantage for another. Hardware Mode
In Hardware Mode the X-keys declares itself as a native USB keyboard and/or mouse and sends only USB keyboard or mouse messages to the USB port. The macros are stored in the X-keys onboard memory and played when the appropriate X-keys button is pressed. After originally programming the X-keys there is no software involved. This mode is very similar to our PS/2 keyboard emulating X-keys. The data flow is simple and direct. The X-keys sends out a series of USB key codes, and the OS sends these to the active application just as if they were from a standard USB keyboard or mouse.
*MacroWorks or other PI software is used to program X-keys and put them into Hardware Mode. If the software is installed on the computer, X-keys can still be programmed and reprogrammed, but the process takes longer as the memory is read or written to. Software mode with MacroWorks
In this mode the X-keys transmits simple data (SPLAT messages) to the HID consumer page and MacroWorks translates the data into useful actions. This is the standard “out of the box” configuration for most X-keys because it provides the greatest utility for general use with Windows operating systems. In this mode there is a programming GUI and macros can be quickly recorded and edited. The macros are stored on the computer and have virtually unlimited length. More complicated macros can be developed including timing delays, combinations of mouse and keyboard commands, and Windows specific functions like launching applications, opening directories, or getting date and time from the OS. The Data flow is more complicated than other modes. The X-keys sends simple HID consumer page SPLAT Messages to the USB HID driver. These messages are recognized by MacroWorks through PIEHID.dll. MacroWorks then correlates the message from the X-keys to the desired actions recorded in MacroWorks as scripts. It sends messages to the OS keyboard stream, mouse stream or to some other known windows functions based on these scripts. Underlying MacroWorks is a complete scripting language, allowing complicated macros to be developed by the user or others in the X-keys community. This scripting language allows correlation of multiple events from more than one X-keys or it can create application specific macros.
Software Mode with a Custom Application
In Software Mode an application developer can access the data (SPLAT Messages) from X-keys directly. This gives the developer complete control of the hardware-software interaction. This mode is direct and simple for specific applications where the X-keys will be dedicated to one purpose and the software can be written to directly interact with the X-keys. P.I. Engineering, Inc has developed extensive SDKs with programming examples in several popular programming languages (Visual Studio (VS) C# 2008 Express, VS C++ 2005 and VS Visual Basic 2008 Express) to assist developers. PIEHID.dll (provided with the SDK) is a special dll that makes accessing the SPLAT messages on the HID consumer page very easy. In this mode the X-keys transmits data (SPLAT messages) to the HID consumer page, PIEHID.dll picks up the messages and holds them for the application. The custom developed application receives the messages from PIEHID.dll and performs the required action. The application can also send SPLAT Messages to the X-keys through PIEHID.dll to change LED states or send text to an LCD display. P.I. Engineering has also added a "Dongle" feature to many of our X-keys which allows the developer to query the X-keys for an encrypted response code.
For More InformationLearn more about HID and SPLAT messages in our P.I. Engineering SDKs or contact us by E-mail: tech@xkeys.com Download a printable copy of this document here: HIDUSB.pdf
© Copyright 2010, P.I. Engineering, Inc. All rights reserved. | |
|
Home |
Products |
X-keys |
Y-mouse |
X-Blox |
OEM/DIY |
Accessories |
Software|
Developer|
Utilization|
Support |
Shopping-Cart |
Checkout |FAQ |
Site Map
| |
|
X-keys, Y-mouse, RailDriver and The No Slogan Company are Trademarks of P.I. Engineering, Inc. E-mail: sales@piengineering.com P.I. Engineering101 Innovation Parkway Williamston, MI U.S.A. 48895 1-517-655-5523 FAX: 1-517-655-4926 www.piengineering.com | www.xkeys.com | www.ymouse.com | www.raildriver.com |
Visit Our Other Product Sites: |