[New Device] Keychron keyboards (stock firmware)
<!-- When naming the support request please title the request as `[New Device] <Name of new device>` Please open one issue per device you would like to add --> ### Name of device: Keychron Keyboards <!-- Please put the name of the product, including manufacturer, beneath this line --> ### Link to manufacturer's product page: https://www.keychron.com <!-- Please add a link to the manufacturer's product page beneath this line --> ### Please select what type of device/interface the device uses: <!-- Please select from one of the following This determines how the device connects to the PC --> ~"DeviceType::USB" <!-- The device connects to an internal header or external usb port --> <!-- Please delete any lines that are not relevant --> ### ID information: HID\VID_05AC&PID_024F&REV_0110&MI_01&Col03 (that's Keychron K3 v2 Optical RGB, I only own that one) <!-- For PCI (GPU) devices we will need the Vendor ID, Device ID, Sub-Vendor ID and Sub-Device IDs To get the Device ID formation for a GPU on Windows run the following command in Powershell: wmic path Win32_VideoController get name,PNPDeviceID Linux this can be found using the terminal: lspci -d 1002: -nnvm | head -6 | tail -n 4 && lspci -d 10DE: -nnvm | head -6 | tail -n 4 --> <!-- For USB devices we will need the USB VID and PID Windows Powershell: gwmi Win32_USBControllerDevice |%{[wmi]($_.Dependent)} | Sort Manufacturer,Description,DeviceID | Ft -GroupBy Manufacturer Description,Service,DeviceID Linux Terminal: lsusb --> ### Please attach screenshots of the device's ~~official~~ somewhat compatible control application here: <p> <details> <summary>Click to show screenshots</summary> ![NINJA71K5_lJlmnk7Esz](/uploads/7a6c13c8540e617d03cc3bc2b119ee43/NINJA71K5_lJlmnk7Esz.png) ![NINJA71K5_MV1Qw1oY9q](/uploads/50a3dfdb299d4a0c2f3190e67edc0a83/NINJA71K5_MV1Qw1oY9q.png) ![NINJA71K5_vjSwNenRVi](/uploads/22bc84143b88dbcaa8b8a11577cedc3e/NINJA71K5_vjSwNenRVi.png) ![image](/uploads/483977aecf0c39c6a2be6d351e0f8240/image.png) ^ wrong mapping for the K3, likely others too; software breaks keyboard's light button; fix: FN+Z+J (factory reset), it does NOT replace firmwares, merely uses a similar or same communications protocol. Apart from the mapping, functional, RGB-wise. </details> </p> <!-- Screenshots of the official control software should show lists of supported modes, color selection, and zone/LED selection capabilities of the device's official software. --> ### Please attach device captures here: Wireshark [blue.pcapng](/uploads/7dbeb4d97ff569a132b72b0219d09a9c/blue.pcapng) (might have a key press logged) [green.pcapng](/uploads/55bc790be87fe67d4fde0c8ca5b0f26a/green.pcapng) [red.pcapng](/uploads/0bd466a2604d4ca3c081327b66993ca0/red.pcapng) Captured from [Ninja71 software](https://www.monstargears.com/75/?q=YToxOntzOjEyOiJrZXl3b3JkX3R5cGUiO3M6MzoiYWxsIjt9&bmode=view&idx=3106747&t=board) <!-- If you have code examples from other projects please link them here or alternatively for information on how to capture device packets please refer to the wiki article https://gitlab.com/Dr_No/OpenRGB/-/wikis/OpenRGB-doesn%27t-have-my-device --> ### Additional info: I've worked on it a little myself, and I managed to find a full document of the communications protocol, straight from the CEO of Keychron, sadly only in Chinese: <p> <details> <summary>Click this to show document</summary> [Keychron_Keyboard_Protocals_0122_2_EN__1_.pdf](/uploads/60bdc82199addddfe834dbb9e99ef61e/Keychron_Keyboard_Protocals_0122_2_EN__1_.pdf) It's been translated from Chinese with DeepL, original is inside the PDF. A very important table - command definition, got lost in translation. Attaching original, just in case: ![image](/uploads/9a5c26600edb1548bad6f8be99cb3218/image.png) </details> </p> This protocol uses HID Set/Get Report to transfer data (?), everything is documented, unfortunately it was out of my scope to test it, however the packets I captured, and the feature set available in the software I captured from, prove that it is the same protocol. # ## Update: all modes capture as in the following screenshot in the same order: [everymode.pcapng](/uploads/53600596882dc61080e5a2da64797c22/everymode.pcapng) <p> <details> <summary>Click this to show screenshot</summary> ![Screenshot](/uploads/c0a10d3122baf4830a9f8d239d09512d/NINJA71K5_dzK4z02C8N.png) </details> </p> # ## Update 2: Extra captures for various controls on different modes <p> <details> <summary>Brightness information</summary> 16 values, 1 being off completely and 16 being brightest, captured left to right according to the screenshot ![image](/uploads/cd81483fe7f510c0881beb3db9e59336/image.png) </details> </p> <p> <details> <summary>Color information</summary> RGB values it seems, any color can be set. I did red to green to blue </details> </p> <p> <details> <summary>Direction information</summary> Available are either up down or left right, direction in capture is as in the file names (so updown means I pressed up then pressed down) Modes that have a direction: Scrolling, Rolling, Flowing, Tilt </details> </p> <p> <details> <summary>Speed information</summary> same as brightness ![image](/uploads/7c5a1ff5a8962da63dc021d9f0862f59/image.png) Modes that don't have speed: Static, UserDefine </details> </p> All captures in an archive: [captures_k3_ninja71.zip](/uploads/725925d4de4ea24c229e34c91515b4a0/captures_k3_ninja71.zip) Pay attention to the names of the capture files. Stuff like updown means I captured direction up then down <!-- For admin purposes: Please leave this section as is --> # Checklist for Step2 - [x] Name of device - [x] A link to the vendors product page has been included - [x] The transport bus has been identified and the appropriate label added to the issue. - [x] The device ID's have been included for [USB](https://gitlab.com/Dr_No/OpenRGB/-/wikis/USB-Vendor-Identification-and-Product-Identification) or PCI - [x] Screenshots of the OEM Application are included - [x] There is either, appropriate code examples linked or suitable device captures attached <!-- For admin purposes: Please leave this section as is -->
issue