Skip to content

Add backlight control for Litra Beam LX#560

Draft
Copilot wants to merge 3 commits intomainfrom
copilot/add-backlight-control-commands
Draft

Add backlight control for Litra Beam LX#560
Copilot wants to merge 3 commits intomainfrom
copilot/add-backlight-control-commands

Conversation

Copy link
Contributor

Copilot AI commented Feb 9, 2026

Adds programmatic control of the Litra Beam LX backlight via driver functions and CLI commands.

Driver API

Three new functions in driver.ts:

  • backlightOn(device) - Sends HID command 0x11 0xff 0x0a 0x4b 0x01
  • backlightOff(device) - Sends HID command 0x11 0xff 0x0a 0x4b 0x00
  • isBacklightOn(device) - Queries backlight state via 0x11 0xff 0x0a 0x3b

All functions validate device type and throw for non-Beam LX devices.

CLI Commands

  • litra-backlight-on - Turn on backlight
  • litra-backlight-off - Turn off backlight

Both support --serial-number for multi-device setups.

Usage

import { findDevice, backlightOn, backlightOff, isBacklightOn } from 'litra';

const device = findDevice();

if (device && device.type === 'litra_beam_lx') {
  backlightOn(device);
  console.log(isBacklightOn(device)); // true
  
  backlightOff(device);
  console.log(isBacklightOn(device)); // false
}
litra-backlight-on --serial-number ABC123
litra-backlight-off --serial-number ABC123

Device Support

Litra Beam LX only. Functions throw "Backlight control is only supported on Litra Beam LX devices" for Litra Glow and Litra Beam.

Original prompt

The current driver implementation does not provide functionality to control the backlight of Logitech Litra devices. There is a need to introduce new commands such as back-on, back-off, and potentially others to allow users to manage the backlight state programmatically, similar to the existing power and brightness controls.

Issue created by Visual Studio Copilot


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits February 9, 2026 20:47
Co-authored-by: timrogers <116134+timrogers@users.noreply.github.com>
- Added backlightOn, backlightOff, and isBacklightOn functions to driver.ts
- Created comprehensive tests for backlight functionality
- Added litra-backlight-on and litra-backlight-off CLI commands
- Updated package.json with new CLI command entries
- All 86 tests passing

Co-authored-by: timrogers <116134+timrogers@users.noreply.github.com>
Copilot AI changed the title [WIP] Add commands for controlling backlight on Logitech Litra devices Add backlight control for Litra Beam LX Feb 9, 2026
Copilot AI requested a review from timrogers February 9, 2026 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants