From 4aac9f49e99a025cdd8d03bc4388afa5a23b4c51 Mon Sep 17 00:00:00 2001 From: Johan Nyman Date: Thu, 11 Jan 2024 08:00:36 +0100 Subject: [PATCH] chore: doc --- packages/core/src/xkeys.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/core/src/xkeys.ts b/packages/core/src/xkeys.ts index 94eccc7..a1147bf 100644 --- a/packages/core/src/xkeys.ts +++ b/packages/core/src/xkeys.ts @@ -47,6 +47,9 @@ export class XKeys extends EventEmitter { static get vendorId(): number { return XKEYS_VENDOR_ID } + /** + * Takes a HID device as input. If the HID device is NOT an X-Keys returns null, otherwise some info about it. + */ static filterDevice(deviceInfo: DeviceInfo): { product: Product; productId: number; interface: number } | null { if (deviceInfo.vendorId !== XKEYS_VENDOR_ID) return null