feat: add Keychron Q1 HE keyboard support and restructure Keychron controllers

This commit is contained in:
Amadej Kastelic
2026-06-22 00:07:08 +00:00
committed by Adam Honse
parent c2cc7c6163
commit 175f3ed338
5 changed files with 909 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
/*---------------------------------------------------------*\
| QMKKeychronControllerDetect.cpp |
| |
| Detector for Keychron QMK-based keyboards |
| (Q1 HE and other KEYCHRON_RGB-enabled models) |
| |
| This file is part of the OpenRGB project |
| SPDX-License-Identifier: GPL-2.0-or-later |
\*---------------------------------------------------------*/
#include "Detector.h"
#include "QMKKeychronController.h"
#include "RGBController_QMKKeychron.h"
/*---------------------------------------------------------*\
| Q1 HE detector |
\*---------------------------------------------------------*/
void DetectQMKKeychronController(hid_device_info* info, const std::string& name)
{
hid_device* dev = hid_open_path(info->path);
if(dev)
{
QMKKeychronController* controller = new QMKKeychronController(dev, *info, name);
RGBController_QMKKeychron* rgb_controller = new RGBController_QMKKeychron(controller);
ResourceManager::get()->RegisterRGBController(rgb_controller);
}
}
/*---------------------------------------------------------*\
| Register HID detectors |
\*---------------------------------------------------------*/
REGISTER_HID_DETECTOR_IPU("Keychron Q1 HE", DetectQMKKeychronController, KEYCHRON_VID, KEYCHRON_Q1_HE_PID, 1, KEYCHRON_QMK_USAGE_PAGE, KEYCHRON_QMK_USAGE);