diff --git a/src/app/cards/availability.test.ts b/src/app/cards/availability.test.ts index 2c36c32..e04bc6d 100644 --- a/src/app/cards/availability.test.ts +++ b/src/app/cards/availability.test.ts @@ -192,6 +192,20 @@ test("Keychron Nape Pro gets Auto sleep without debounce or signal", () => { assert.equal(has.signal, false); }); +test("Keychron Launcher 8k mice get sleep and debounce, 1k mice only debounce", () => { + const family = (f: string) => cardAvailability(snapshot({ + status: { brand: "Keychron", ui: { family: f }, debounceMs: 4 }, + })); + const k8 = family("keychron-8k"); + assert.equal(k8.advancedHost, true); + assert.equal(k8.sleep, true); + assert.equal(k8.debounce, true); + const k1 = family("keychron-1k"); + assert.equal(k1.advancedHost, true); + assert.equal(k1.sleep, false); + assert.equal(k1.debounce, true); +}); + test("a driver may opt into the advanced section and still suppress its cards", () => { const has = cardAvailability(snapshot({ status: { diff --git a/src/device/traits.ts b/src/device/traits.ts index 737f986..d4b4c28 100644 --- a/src/device/traits.ts +++ b/src/device/traits.ts @@ -48,9 +48,12 @@ const BY_FAMILY: Readonly>> = { "atk-bitmouse": DIRECT_MODE, ninjutso: { ...DIRECT_MODE, ninjutso: true }, "keychron-nape": { advancedSection: true, sleep: true, directMode: true }, - // The M6 reads debounce and sleep from its 0x06 status report and publishes - // its own option lists, so it takes the plain flags rather than DIRECT_MODE. - "keychron-m6": { advancedSection: true, sleep: true, debounce: true }, + // Launcher's "8k" family (the M6 and most Keychron mice) reads debounce and + // sleep from its 0x06 status report and publishes its own option lists, so + // it takes the plain flags rather than DIRECT_MODE. + "keychron-8k": { advancedSection: true, sleep: true, debounce: true }, + // Launcher's "1k" protocol has no sleep command, so only debounce. + "keychron-1k": { advancedSection: true, debounce: true }, // Launcher offers no sleep setting for the 4K family, so only debounce. "keychron-4k": { advancedSection: true, debounce: true }, // The 8K Nordic family (G3 Air) keeps debounce and sleep in its system block