The XK-4 (Part # XKS-04-USB-R), XK-8 (Part # XKS-04-USB-R), and XK-16 (Part # XK-0981-UCK16-R) are user programmable computer input devices. They are complete keystrips suitable for desktop or mounted use.

These devices use the Human Interface Device (HID) class protocol. They can emulate keyboard, mouse, game controller (joystick), and multimedia commands. The devices can also communicate directly with macro software such as MacroWorks 3.1, or any custom software written using the PI Engineering Software Development Kit (SDK) or raw data reports.

The standard keycaps are designed for insertion of custom labels by the user.

Assorted accessories are available, including mounting kits.


  • Single row of 4/8/16 keys
  • Blue individually-controlled backlighting for each key
  • Green and red indicator LEDs
  • Internal memory for recording keyboard, mouse, game controller, and multimedia macros; enabling OS-independent operation
  • Support by MacroWorks 3.1 (Windows) and ControllerMate for X-keys (Mac) in software mode
  • Complete SDK, for Windows, Linux, and Android; raw data reports available for other platforms
  • Detachable angled feet, allowing subtle tilt in portrait or landscape orientation
  • Phantom key protection

Alternate Versions

If the standard USB HID Sticks do not quite meet your needs, one of the alternate versions available may. Also available are:

  • XK-16, XK-8, or XK-4 for KVM (part #XK-1320-UKVM16-R, #XK-1321-UKVM8-R, and #XK-1322-UKVM4-R), USB devices with special firmware designed to work well on KVM systems

Indicator LEDs:

LEDs light here

Two indicator LEDs are on the top left corner of the device. The green LED will be on by default when the device is powered. The red LED is used, by default, to indicate when a second layer of device programming is being accessed.

These indicator LEDs can be controlled by developers within their software, and can be used to indicate any state within the software.


Program Switch:

Program switch

The program switch is located on the left side edge of the XK-4/8/16. Flipping this switch will trigger the MacroWorks 3.1 interface by default, if a user is working in software mode.

The switch can be used as an additional input by developers.


Labeling a Key:

Carefully pry the lens off

Labels may be inserted under the clear lens, which can be removed by prying with a fingernail or other thin object. Additionally, custom keycaps and lens are available. Please visit our website for more information on labels.

Replacement Keys:

The XK-4/8/16 Stick uses a low profile tactile switch with a square stem. We offer single replacement keys with a backlighting window in the base which allows blue LED to illuminate the key legend from the back.

Visit our website for more details.

  • XK-A-106-R – Beige replacement keycap
  • XK-A-303-R – Key Puller

LED Backlights:

The XK-4/8/16 comes with 16 individually programmable backlight LEDs, one blue for each key. By default, when the device is first powered up the blue LEDs will all turn on, though this can be changed to conserve power or other reasons.

The LED state can be switched on or off for each individual key, as well as the intensity. LEDs can also be programmed to flash. The XK-4/8/16 features keycaps with a partially transparent slot, increasing backlight visibility.

Complete backlighting control is available for advanced users via scripting (in MacroWorks 3.1) or our software development kit.

Key Matrix:

Numbered XK-16

In MacroWorks 3.1 or other consumer software, buttons are numbered sequentially starting with button 1 on the side of the device closest to the indicator LEDs.

Users of our software development kit will follow the same numbering scheme, however the button numbers used will be 0-15 rather than 1-16.

With the ControllerMate for X-keys software (on Mac OS X) the button numbering may be different.


Phantom Key Protection:

Diodes are in placed underneath each button to prevent "phantom button presses" when multiple buttons are pressed, which can be a problem on standard keyboards.

Unlike a a typical computer keyboard's protection scheme, this design prevents buttons from being ignored during multiple button press scenarios.

Non-volatile Memory:

The XK-4/8/16 has on-board non-volatile memory which macros can be recorded to, typically known as "hardware mode." The macro types support by hardware programming include keyboard, mouse, joystick (game controller), and multimedia.

This memory enables the X-keys to retain button macros within the unit. Regardless of what computer (or USB-enabled machine) the device is plugged into, the macros will play back without the use of additional software or drivers, once programmed.

A total of approximately 1000 keystrokes can be recorded on a single unit. Other types of macros, such as game controller or mouse messages, or backlighting control, may take up more space than a normal keystroke, and reduce the amount of total programming available on the device.

Unit ID:

Each device has something called a Unit ID stored in its memory, which identifies a unique device connected to a computer. This prevents conflicts, enabling two XK-24s to be used on the same computer with different programming.

From the factory, this ID is set to 0. The ID is incremented by MacroWorks 3.1 when it is connected to your comuputer (first unit connected will be set to 1, second to 2, and so on). Users may assign the Unit ID of their choosing (1-254) on the Unit Data tab within MacroWorks 3.1. Note: MacroWorks 3.1 assigns scripts based on Unit ID, so changing the ID after programming macros will require reloading in the appropriate script.

The Unit ID may also be accessed and modified by developers using our Software Development Kit, should distinguishing between two otherwise identical devices be required.

Endpoints and PIDs:

Several USB HID endpoints are available to allow the device to emulate standard USB HID devices. The Product ID (PID) may be changed to use different combinations. The different models of this series are identified by a set of Product IDs (PID). The PID may be changed for each type of unit to use different combinations of endpoints.

  • XK-16 PID 1049 endpoints: Keyboard, Mouse, PI Consumer Input, Output
  • XK-16 PID 1050 endpoints: Keyboard, Joystick, Mouse, Output
  • XK-16 PID 1051 endpoints: Keyboard, Joystick, PI Consumer Input, Output
  • XK-16 PID 1251 endpoints: Keyoard, Mouse, Multimedia, Output
  • XK-8 PID 1130 endpoints: Keyboard, Mouse, PI Consumer Input, Output
  • XK-8 PID 1131 endpoints: Keyboard, Joystick, Mouse, Output
  • XK-8 PID 1132 endpoints: Keyboard, Joystick, PI Consumer Input, Output
  • XK-8 PID 1252 endpoints: Keyboard, Mouse, Multimedia, Output
  • XK-4 PID 1127 endpoints: Keyboard, Mouse, PI Consumer Input, Output
  • XK-4 PID 1128 endpoints: Keyboard, Joystick, Mouse, Output
  • XK-4 PID 1129 endpoints: Keyboard, Joystick, PI Consumer Input, Output
  • XK-4 PID 1253 endpoints: Keyboard, Mouse, Multimedia, Output

Keyboard – Sends keyboard HID codes
Mouse – Mouse clicks, buttons, movements
Joystick – Game buttons 1-32, POV hat, x,y,z axis movement
PI Consumer Input – Sends custom messages to the HID consumer page for custom software
Output – Output to device, required endpoint for programming and controlling LEDs
Mulitimedia - Multimedia – Multimedia commands, such as those typically available on multimedia-enhanced keyboards: Play/Pause, Next Track, Mute, and so on

Software Development Kits:

The SDK (software development kit) contains information and sample programs to demonstrate how to implement X-keys directly into a custom application.

SDKs are available for Windows (C++, C# and VB.NET), Linux (C++) and Android (Java). The Windows SDK includes a 32-bit unmanaged DLL, and 32 and 64-bit managed (.NET) dlls, for ease of implementation. Raw HID data can be used to communicate to the device on other platforms or in other languages, if desired. Please visit our website's developer section for more information.


Mounting Kits:

Mounting kits are available for the XK-4/8/16

X-Keys Stick Rack Mount Kit - Part # XK-A-77-R

Visit our website for details.

Cable Length:

The XK-4/8/16 has an attached 1.4 m cord. It may be possible to use a short extension cord if a little extra length is needed. To achieve lengths much greater than 5 meters a USB Extender must be used. The X-keys® Extender uses Category 5 cable to extend the connection between any X-keys USB device and the USB port on the computer. Standard CAT 5 cable cut to any length up to 150 feet (45.7 m) and wired with standard RJ45 network connectors can be used to create a reliable long distance USB connection.

Customizing Length:

The XK-16 may be factory cut to a shorter length, down to a minimum of 3 keys. Please consult our web site for more details on custom versions.


Operating System
Use: Any OS via USB HID | Programming: Windows XP through 10, Mac OS X 10.4 through 10.10
Free Programming Software
Windows: MacroWorks 3.1 
Mac: ControllerMate for X-keys
Free Software Development Kits
Windows (C++, C#, VB.NET) 
Linux (C++) 
Android (Java) 
Raw HID (any language/OS)
Emulation Modes
HID keyboard, HID mouse, HID game controller
Switch Types
Low profile tactile, guaranteed for over 1 million operations
Number of Keys
16, 8, or 4 single keys, 1 programming slide switch
Actuation Force
Approx. 6 oz (170g) break-over, approx. 2 oz (57g) hold, audible click
0.625” (16mm) sq.; relegendable with window for backlight and square stem
Key Spacing
0.75" O.C.
1 blue addressable LED under each key
Wired USB 2.0 standard “A” plug
Cord Length
54” (1.3 m)
Dimensions and Weight
XK-16: 14.25” x 0.9”” x 0.65", (362 mm x 23 mm x 17 mm), 7 oz. (200 g) 
XK-8: 8.2” x 0.9”” x 0.65", (208 mm x 23 mm x 17 mm), 4 oz (115 g) 
XK-4: 5.35” x 0.9”” x 0.65", (136 mm x 23 mm x 17 mm) 3 oz (85 g)
USB type
USB 1.1 compatible through 3.0
Power Source
USB port, nominal voltage = 5 VDC
Power Consumption
XK-16: no backlighting: 21mA, backlighting at full intensity: 32mA 
XK-8: no backlighting: 19mA, backlighting at full intensity: 28mA 
XK-4: no backlighting: 19mA, backlighting at full intensity: 26mA
Temperature Range
-20 to 60 C
Memory Capacity
Approximately 1,000 keystrokes or commands in onboard memory
Memory Type
EEPROM, non volatile memory (X-keys retains memory for over 200 years)
Environmental Rating
IP 40, typical indoor office environment
FCC class B, CE, RoHS, WEEE compliant


Specifications are subject to change without notice.

Contact Information

For tech support please email tech@piengineering.com. To purchase accessories or additional devices, contact sales@piengineering.com.