Skip to main content
Version: Matrix OS 3.2

HID API

Preview notice

The MatrixOS Python API is in preview and is subject to change; it may contain errors.

Overview

The HID (Human Interface Device) system in MatrixOS allows the device to act as a USB HID device, emulating keyboards, gamepads, and custom communication protocols. The HID API is available as MatrixOS.HID with various submodules for different device types.

The Python HID API is implemented in Applications/Python/PikaPython/MatrixOS_HID.py with type hints in Applications/Python/PikaPython/_MatrixOS_HID.pyi.


MatrixOS.HID.Ready

def Ready() -> bool

Checks if the HID subsystem is ready for operation.

Returns:

  • bool: True if HID is ready, False otherwise

HID Submodules

Keyboard API - Keyboard Input Device

The keyboard HID interface allows sending keyboard input to connected devices. See the Keyboard documentation for detailed information on:

  • Key press and release events
  • Keyboard shortcuts and combinations
  • Text input simulation
  • Function keys and special keys

Gamepad API - Game Controller Device

The gamepad HID interface allows the device to appear as a game controller. See the Gamepad documentation for detailed information on:

  • Button mapping and states
  • Analog stick simulation
  • D-pad controls
  • Gamepad-specific features

RawHID API - Custom HID Communication

The raw HID interface provides custom communication protocols. See the RawHID documentation for detailed information on:

  • Custom data protocols
  • Bidirectional communication
  • Application-specific messaging
  • Raw data transmission

Comments