X-keys XK-12 Touch Data Report

General Information

VID
05f3h
PID #1 (Factory Default)
0432h or 1074
PID #2
0434h or 1076
Consumer Usage Page
1
Usage Page
000Ch or 12

X-keys XK-12 Touch Input Report

X-keys XK24

Figure 1: X-keys XK-12 Touch key reference.

Endpoint: 3, Consumer Usage Page.

PID #1 Additional Endpoints: 1, Keyboard (Hid Usage Page 1, Hid Usage 6) and 2, Mouse (Hid Usage Page 1, Hid Usage 2).
PID #2 Additional Endpoints: 1, Keyboard (Hid Usage Page 1, Hid Usage 6) and 2, Joystick (Hid Usage Page 1, Hid Usage 4).

Report Length: 33 bytes

1. General Incoming Data - Relative Mode

This data is returned when new data is detected such as button presses, unit id change or touch of touchpad. This report can be manually stimulated by sending a Generate Data output report which is very useful for obtaining the initial state of the device immediately after enumeration. Send a Touchpad Mode Change output report to change the way the touchpad reports data; either absolute or relative.

Byte 1
Byte 2
Byte 3
Byte 4
Byte 5
Byte 6
Byte 7
Byte 8
Byte 9
Byte 10
Byte 11-13
Bytes 14-17
Bytes 18-33
Constant Unit ID Data Type Keys Keys Keys Keys Z Delta X Delta Y Reserved Time Stamp Reserved
0
<data>
PS
D1
D2
D3
D4
Z
DX
DY
value
Time
value

PS: 0 if program switch unset, 1 if program switch is set, 2 if generated by the Generate Data (output report 6) and program switch is unset, 3 if generated by the Generate Data (output report 6) and program switch is set.
D1: For all bits 0 for key up, 1 for key down.  Bit 1=Key 0, bit 2=Key 1, bit 3=Key 2, bits 4-8=0 always.
D2: For all bits 0 for key up, 1 for key down.  Bit 1=Key 8, bit 2=Key 9, bit 3=Key 10, bits 4-8=0 always.
D3: For all bits 0 for key up, 1 for key down.  Bit 1=Key 16, Bit 2=Key 17, bit 3=Key 18, bits 4-8=0 always.
D4: For all bits 0 for key up, 1 for key down.  Bit 1=Key 24, Bit 2=Key 25, bit 3=Key 26, bits 4-8=0 always.
Z: Gives a 1 when touchpad is tapped gently down and up. If the touchpad is tapped gently down and up and then held down the value will stay 1 (equivalent to holding the left mouse button down). This byte would be used for the tap to click feature if using the touchpad as a mouse.
DX: Gives the relative X axis of the touchpad. This mode is desirable if the touchpad is to be used as a mouse.
DY: Gives the relative Y axis of the touchpad. This mode is desirable if the touchpad is to be used as a mouse.
Time: If enabled using Enable Time Stamp output report gives a time in ms starting from when the device was plugged into a port in 4 bytes where byte 15 is the MSB or high byte and byte 18 is the LSB or low byte.

2. General Incoming Data - Absolute Mode

This data is returned when new data is detected such as button presses, unit id change or touch of touchpad. This report can be manually stimulated by sending a Generate Data output report which is very useful for obtaining the initial state of the device immediately after enumeration. Send a Touchpad Mode Change output report to change the way the touchpad reports data; either absolute or relative.

Byte 1
Byte 2
Byte 3
Byte 4
Byte 5
Byte 6
Byte 7
Byte 8
Byte 9
Byte 10
Byte 11
Byte 12
Byte 13
Bytes 14-17
Bytes 18-33
Constant Unit ID Data Type Keys Keys Keys Keys X Hi X Low Y Hi Y Low Z Reserved Time Stamp Reserved
0
<data>
PS
D1
D2
D3
D4
XH
XL
YH
YL
Z
value
Time
value

PS: 4 if program switch unset, 5 if program switch is set, 6 if generated by the Generate Data (output report 6) and program switch is unset, 7 if generated by the Generate Data (output report 6) and program switch is set.
D1: For all bits 0 for key up, 1 for key down.  Bit 1=Key 0, bit 2=Key 1, bit 3=Key 2, bits 4-8=0 always.
D2: For all bits 0 for key up, 1 for key down.  Bit 1=Key 8, bit 2=Key 9, bit 3=Key 10, bits 4-8=0 always.
D3: For all bits 0 for key up, 1 for key down.  Bit 1=Key 16, Bit 2=Key 17, bit 3=Key 18, bits 4-8=0 always.
D4: For all bits 0 for key up, 1 for key down.  Bit 1=Key 24, Bit 2=Key 25, bit 3=Key 26, bits 4-8=0 always.
XH: Gives the MSB or high byte of the absolute X axis of the touchpad. Range for X axis after bytes are combined is 0-2047.
XL: Gives the LSB or low byte of the absolute X axis of the touchpad.
YH: Gives the MSB or high byte of the absolute Y axis of the touchpad. Range for Y axis after bytes are combined is 0-1535.
YL: Gives the LSB or low byte of the absolute Y axis of the touchpad.
Z: Gives the Z axis of the touchpad. Z axis is the pressure of the touch, range is 0-127.
Time: If enabled using Enable Time Stamp output report gives a time in ms starting from when the device was plugged into a port in 4 bytes where byte 15 is the MSB or high byte and byte 18 is the LSB or low byte.

3. Descriptor Data

This data is returned after a Request for Descriptor output report is sent.

Byte 1
Byte 2
Byte 3
Byte 4
Byte 5
Byte 6
Byte 7
Byte 8
Byte 9
Byte 10
Byte 11
Byte 12
Byte 13
Byte 14
Bytes 15-33
Constant Unit ID Data Type Mode Key mapstart Layer2 Offset Write Report Length-1 Read Report Length-1 Max Columns Max Rows LED State Version PID Low PID Hi Reserved
0
<data>
214
Mode
32
128
35
32
4
6
LEDs
<data>
PIDL
PIDH
value

Mode: 0 means device is in PID #1, 2 means the device is in PID #2.
LEDs: Bit 7=1 for Green LED on, 0 for Green LED off, bit 8=1 for Red LED on, bit 8=0 for Red LED off.
PIDL: LSB of the Product Identification number or PID.
PIDH: MSB of the Product Identification number or PID.

4. Check Key Data

This data is returned after a Check Key output report is sent.

Byte 1
Byte 2
Byte 3
Byte 4
Byte 5
Byte 6
Byte 7
Byte 8
Bytes 9-33
Constant Unit ID Data Type Constant R0 value R1 value R2 value R3 value Reserved
0
<data>
193
121
R0
R1
R3
R4
value

R0: Value need for comparison to check for correct dongle key.
R1: Value need for comparison to check for correct dongle key.
R2: Value need for comparison to check for correct dongle key.
R3: Value need for comparison to check for correct dongle key.

X-keys XK-12 Touch Output Report

The following types of output reports are shown in the summary below.

Report
Format
Description
1
0, 186, LEDs, 0... Set LEDs
2
0, 179, LEDIndex, State, 0... Index Based Set LED (Flash)
3
0, 189, UnitID, 0... Set Unit ID
4
0, 214, 0... Request Descriptor
5
0, 210, Enable, 0... Enable Time Stamp
6
0, 177, 0... Generate Data
7
0, 187, Bank 1 Intensity, Bank 2 Intensity, 0... Set Backlight Intensity
8
0, 184, 0... Toggle Backlights
9
0, 183, ScrLk, 0... Enable Scroll Lock to Toggle Backlights
10
0, 182, Bank, OnOff, 0... Turn On/Off Rows of Backlights
11
0, 181, Index, State, 0... Index Based Set Backlights (Flash)
12
0, 180, Freq, 0... Set Frequency of Flash
13
0, 199, Save, 0... Save Backlight State to EEPROM
14
0, 204, Mode, 0... Change PID
15
0, 217, TMode, FSE, 0... Touchpad Mode Change
16
0, 201, Modifier, 0, HC1, HC2, HC3, HC4, HC5, HC6, 0... Keyboard Reflector
17
0, 203, Buttons, Mouse X, Mouse Y, Wheel X, Wheel Y, 0... Mouse Reflector+
18
0, 202, Joystick X, Joystick Y, Joystick Z rot., Joystick Z, Joystick Slider, Game Buttons 1, Game Buttons 2, Game Buttons 3, Game Buttons 4, 0, Point of View Hat, 0... Joystick Reflector++
19
0, 192, K0, K1, K2, K3, 0... Set key for dongle implementation*
20
0, 137, 137, 0, N0, N1, N2, N3, 121, 0... Check key for dongle implementation*

+ Must be in PID #1 to use.
++ Must be in PID #2 to use.
*see Dongle Implementation for complete details.

Endpoint: 4, Vendor Defined Usage Page.

Report Length: 36 bytes.

1. Set LEDs

One of two methods for controlling the LEDs.

Byte 1
Byte 2
Byte 3
Bytes 4-36
Constant Command LED Control Constant
0
186
LEDs
0

LEDs: Bits 1-6=0, bit 7=1 to turn on Green LED or 0 to turn off Green LED, bit 8=1 to turn on Red LED or 0 to turn off Red LED.

2. Index Based Set LED (Flash)

One of two methods for controlling the LEDs. If flashing of LEDs is desired this method must be used.

Byte 1
Byte 2
Byte 3
Byte 4
Bytes 5-36
Constant Command LED Index LED State Constant
0
179
LEDIndex
LEDState
0

LEDIndex: 6 = green, 7 = red.
LEDState: 0 = off, 1 = on and 2 = flash. Set the frequency of the flash with output report 12. Set Frequency of Flash.

3. Set Unit ID

Send this output report to set the Unit ID of the device. This is useful if connecting more than one of the same device to the a computer.

Byte 1
Byte 2
Byte 3
Bytes 4-36
Constant Command Unit ID (0-255) Constant
0
189
value
0

4. Request Descriptor

After sending this output report a Descriptor input report will be generated.

Byte 1
Byte 2
Bytes 3-36
Constant Command Constant
0
214
0

5. Enable Time Stamp

By default the Time Stamp feature is enabled. To turn off send this command with Byte 3=0.

Byte 1
Byte 2
Byte 3
Bytes 4-36
Constant Command Enable Constant
0
210
0=off, 1=on
0

6. Generate Data

After sending this output report a General Incoming Data input report will be generated with bit 2 of PS set if TMode=3 or with bits 2 and 3 set if TMode=5. This is useful in determining the initial state of the device before any data has changed.

Byte 1
Byte 2
Bytes 3-36
Constant Command Constant
0
177
0

7. Set Backlight Intensity

Byte 1
Byte 2
Byte 3
Byte 4
Bytes 4-36
Constant Command Bank 1 Intensity Bank 2 Intensity Constant
0
187
Intensity
Intensity
0

Intensity: 0-255 where 0 is no intensity for that color or off, and 255 is the brightest.

8. Toggle Backlights

Byte 1
Byte 2
Bytes 3-36
Constant Command Constant
0
184
0

9. Enable Scroll Lock to Enable Backlights

Send this output report with ScrLk=128 to enable the standard keyboard's ScrLk key to toggle the backlights.

Byte 1
Byte 2
Byte 3
Bytes 4-36
Constant Command Enable/Disable Constant
0
183
ScrLk
0

ScrLk: 0 to disable Scroll Lock, 128 to enable Scroll Lock to toggle backlighting.

10. Turn On/Off Rows of Backlights

Send this output report to either turn on or off rows of the backlights.

Byte 1
Byte 2
Byte 3
Byte 4
Bytes 5-36
Constant Command Bank # State Constant
0
182
Bank
OnOff
0

Bank: 0 = bank 1, 1 = bank 2.
OnOff: For all bits 0 for no backlighting, 1 for backlighting. Bit 0 = 1st row, bit 1=2nd row, bit 2=3rd row, bit 3=4th row, bit 4=5th row, bit 5=6th row. Note the intensities are not affected by this command.

11. Index Based Set Backlights (Flash)

Another method to control the backlights. If flashing of backlights is desired this method must be used.

Byte 1
Byte 2
Byte 3
Byte 4
Bytes 5-36
Constant Command Key Index State Constant
0
181
Index
State
0

Index: For bank 1 equals the index given in Figure 1. For bank 2 add 32 to the index given in Figure 1. For example to control the lower left key bank 1 index=5, the corresponding bank 2 is index=37.
State: 0 = off, 1 = on and 2 = flash. Set the frequency of the flash with output report 12. Set Frequency of Flash.

12. Set Frequency of Flash

Use this output report to control the frequency of the flashing of both the indicator LEDs and the backlights, same frequency is used for both.

Byte 1
Byte 2
Byte 3
Bytes 4-36
Constant Command Frequency Constant
0
180
Freq
0

Freq: 1-255 where 1 is the fastest flash and 255 is the slowest. 255 is approximately 4 seconds between flashes.

13. Save Backlight State to EEPROM

Send this output report to change the default backlighting on startup of device to the current backlight state, ie, what ever backlights are on or off at the time this report is sent will be the new default.

Byte 1
Byte 2
Byte 3
Bytes 4-36
Constant Command Save Constant
0
199
Save
0

Save: Any value other than 0 will save the current backlight state to the EEPROM so when the device is replugged it will display this save backlighting. Note because there is a limited number of times the EEProm can be written to, it is not a good idea to do this often.

14. Change PID

Send this output report to change between the two PIDs. This needs to be done only if the user wishes to have the joystick endpoint.

Byte 1
Byte 2
Byte 3
Bytes 4-36
Constant Command Mode Constant
0
204
Mode
0

Mode: 0 for PID #1, reporting to the USB as a Splat device (IN and OUT), a mouse, and a keyboard and 2 for PID #2, reporting as a Splat device (IN and OUT), joystick and a keyboard.

15. Touchpad Mode Change

Send this output report to change the behavior of the touchpad and how the touchpad reports data in the input report.

Byte 1
Byte 2
Byte 3
Byte 4
Bytes 5-36
Constant Command Mode Flip, Suppress, Enable Constant
0
217
TMode
FSE
0

TMode: 3 to have the touchpad send 3 byte relative data (General Incoming Data-Relative Mode) , 5 to have the touchpad send 5 byte absolute data (General Incoming Data-Absolute Mode). These values also control how the touchpad will behave if a native mouse or native joystick are enabled (bit 3 of FSE is set). If a native mouse is desired then the device must be in PID #1 with TMode set to 3. If a native joystick is desired then the device must be in PID #2 with TMode set to either 5 or 7.
FSE:
Set bit 1 to flip vertically the touchpad coordinates, this affects the actual data in the General Incoming Data input reports. This is useful if the unit it desired to be used upside down with keys on top. Default 0. Set bit 2 to suppress the tap to click feature of the touchpad, applicable only if native mouse is enabled. Set bit 3 to enable the native mouse if in PID #1 or the native joystick if in PID #2.

Example: Set touchpad behavior to native mouse with pad in normal orientation, tap to click on. Must be in PID#1.

Byte 1
Byte 2
Byte 3
Byte 4
Bytes 5-36
Constant
Command
Mode
Flip, Suppress, Enable
Constant
0
217
3
4
0

Example: Set touchpad behavior to native mouse with pad with flipped orientation, tap to click off. Must be in PID#1.

Byte 1
Byte 2
Byte 3
Byte 4
Bytes 5-36
Constant
Command
Mode
Flip, Suppress, Enable
Constant
0
217
3
7
0

Example: Set touchpad behavior to native joystick with 0 return, pad in normal orientation. Must be in PID#2.

Byte 1
Byte 2
Byte 3
Byte 4
Bytes 5-36
Constant
Command
Mode
Flip, Suppress, Enable
Constant
0
217
7
4
0

16. Keyboard Reflector

Sends native keyboard messages.

Byte 1
Byte 2
Byte 3
Byte 4
Byte 5
Byte 6
Byte 7
Byte 8
Byte 9
Byte 10
Bytes 11-36
Constant Command Modifier Constant Hid Code 1 Hid Code 2 Hid Code 3 Hid Code 4 Hid Code 5 Hid Code 6 Constant
0
201
Modifier
0
HC1
HC2
HC3
HC4
HC5
HC6
0

Modifier: Bit 1=Left Ctrl, bit 2=Left Shift, bit 3=Left Alt, bit 4=Left Gui, bit 5=Right Ctrl, bit 6=Right Shift, bit 7=Right Alt, bit 8=Right Gui.
HC1=Hid Code for 1st key down, or 0 to release previous key press in this byte position.
HC2=Hid Code for 2nd key down, or 0 to release previous key press in this byte position.
HC3=Hid Code for 3rd key down, or 0 to release previous key press in this byte position.
HC4=Hid Code for 4th key down, or 0 to release previous key press in this byte position.
HC5=Hid Code for 5th key down, or 0 to release previous key press in this byte position.
HC6=Hid Code for 6th key down, or 0 to release previous key press in this byte position.

17. Mouse Reflector

Sends native mouse messages (PID #1 only).

Byte 1
Byte 2
Byte 3
Byte 4
Byte 5
Byte 6
Byte 7
Bytes 8-36
Constant Command Buttons Mouse X Mouse Y Wheel X Wheel Y Constant
0
203
Buttons
X
Y
WX
WY
0

Buttons: Bit 1=Left, bit 2=Right, bit 3=Center, bit 4=XButton1, bit 5=XButton2.
X=Mouse X motion. 128=0 no motion, 1-127 is right, 255-129=left, finest inc (1 and 255) to coarsest (127 and 129).
Y=Mouse Y motion. 128=0 no motion, 1-127 is down, 255-129=up, finest inc (1 and 255) to coarsest (127 and 129).
WX=Wheel X. 128=0 no motion, 1-127 is up, 255-129=down, finest inc (1 and 255) to coarsest (127 and 129).
WY=Wheel Y. 128=0 no motion, 1-127 is up, 255-129=down, finest inc (1 and 255) to coarsest (127 and 129).

18. Joystick Reflector

Sends native joystick messages (PID #2 only).

Byte 1
Byte 2
Byte 3
Byte 4
Byte 5
Byte 6
Byte 7
Byte 8
Byte 9
Byte 10
Byte 11
Byte 12
Byte 13
Bytes 14-36
Constant Command Joystick X Joystick Y Joystick Z rot. Joystick Z Joystick Slider Game Buttons Game Buttons Game Buttons Game Buttons Constant Point of View Hat Constant
0
202
X
Y
Z rot.
Z
Slider
GB1
GB2
GB3
GB4
0
Hat
0

X: Joystick X, 0-127 is from center to full right, 255-128 is from center to full left.
Y: Joystick Y, 0-127 is from center to bottom, 255-128 is from center to top.
Z rot.: Joystick Z rot., 0-127 is from center to bottom, 255-128 is from center to top.
Z.: Joystick Z, 0-127 is from center to bottom, 255-128 is from center to top.
Slider: Joystick Slider, 0-127 is from center to bottom, 255-128 is from center to top.
GB1: Game buttons 1-8, bit 1= game button 1, bit 2=game button 2, etc.
GB2: Game buttons 9-16, bit 1= game button 9, bit 2=game button 10, etc.
GB3: Game buttons 17-24, bit 1= game button 17, bit 2=game button 18, etc.
GB4: Game buttons 25-32, bit 1= game button 25, bit 2=game button 26, etc.
Hat: 0 to 7 clockwise, 8 is no hat.

19. Set Key

Send this output report to set the key used for dongle check feature.

Byte 1
Byte 2
Byte 3
Byte 4
Byte 5
Byte 6
Bytes 7-36
Constant Command K0 (1-254) K1 (1-254) K2 (1-254) K3 (1-254) Constant
0
192
K0
K1
K2
K3
0

K0:  any number between 1 and 254
K1:  any number between 1 and 254
K2:  any number between 1 and 254
K3:  any number between 1 and 254

20. Check Key

Send this output report in conjunction with calling DongleCheck2 to determine the key previously written to the device using Set Key.

Byte 1
Byte 2
Byte 3
Byte 4
Byte 5
Byte 6
Byte 7
Byte 8
Byte 9
Bytes 10-36
Constant Command Command Constant N0 (1-254) N1 (1-254) N2 (1-254) N3 (1-254) Command Constant
0
137
137
0
N0
N1
N2
N3
121
0

N0:  any number between 1 and 254
N1:  any number between 1 and 254
N2:  any number between 1 and 254
N3:  any number between 1 and 254

Back to top