@openmouse/protocol 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +167 -0
- package/README.md +89 -0
- package/dist/asus/index.d.ts +52 -0
- package/dist/asus/index.d.ts.map +1 -0
- package/dist/asus/index.js +248 -0
- package/dist/asus/index.js.map +1 -0
- package/dist/atk/index.d.ts +200 -0
- package/dist/atk/index.d.ts.map +1 -0
- package/dist/atk/index.js +480 -0
- package/dist/atk/index.js.map +1 -0
- package/dist/bitmouse/index.d.ts +284 -0
- package/dist/bitmouse/index.d.ts.map +1 -0
- package/dist/bitmouse/index.js +396 -0
- package/dist/bitmouse/index.js.map +1 -0
- package/dist/compx/codec.d.ts +31 -0
- package/dist/compx/codec.d.ts.map +1 -0
- package/dist/compx/codec.js +50 -0
- package/dist/compx/codec.js.map +1 -0
- package/dist/corsair/index.d.ts +147 -0
- package/dist/corsair/index.d.ts.map +1 -0
- package/dist/corsair/index.js +223 -0
- package/dist/corsair/index.js.map +1 -0
- package/dist/dareu/index.d.ts +136 -0
- package/dist/dareu/index.d.ts.map +1 -0
- package/dist/dareu/index.js +344 -0
- package/dist/dareu/index.js.map +1 -0
- package/dist/drivers/asus/hid.d.ts +29 -0
- package/dist/drivers/asus/hid.d.ts.map +1 -0
- package/dist/drivers/asus/hid.js +419 -0
- package/dist/drivers/asus/hid.js.map +1 -0
- package/dist/drivers/atk/bitmouse-hid.d.ts +80 -0
- package/dist/drivers/atk/bitmouse-hid.d.ts.map +1 -0
- package/dist/drivers/atk/bitmouse-hid.js +501 -0
- package/dist/drivers/atk/bitmouse-hid.js.map +1 -0
- package/dist/drivers/atk/hid.d.ts +163 -0
- package/dist/drivers/atk/hid.d.ts.map +1 -0
- package/dist/drivers/atk/hid.js +1368 -0
- package/dist/drivers/atk/hid.js.map +1 -0
- package/dist/drivers/atk/products.d.ts +13 -0
- package/dist/drivers/atk/products.d.ts.map +1 -0
- package/dist/drivers/atk/products.js +13 -0
- package/dist/drivers/atk/products.js.map +1 -0
- package/dist/drivers/attackshark/dpi.d.ts +41 -0
- package/dist/drivers/attackshark/dpi.d.ts.map +1 -0
- package/dist/drivers/attackshark/dpi.js +215 -0
- package/dist/drivers/attackshark/dpi.js.map +1 -0
- package/dist/drivers/attackshark/hid.d.ts +124 -0
- package/dist/drivers/attackshark/hid.d.ts.map +1 -0
- package/dist/drivers/attackshark/hid.js +728 -0
- package/dist/drivers/attackshark/hid.js.map +1 -0
- package/dist/drivers/corsair/hid.d.ts +70 -0
- package/dist/drivers/corsair/hid.d.ts.map +1 -0
- package/dist/drivers/corsair/hid.js +414 -0
- package/dist/drivers/corsair/hid.js.map +1 -0
- package/dist/drivers/dareu/hid.d.ts +59 -0
- package/dist/drivers/dareu/hid.d.ts.map +1 -0
- package/dist/drivers/dareu/hid.js +478 -0
- package/dist/drivers/dareu/hid.js.map +1 -0
- package/dist/drivers/endgame/egg-op1-hid.d.ts +107 -0
- package/dist/drivers/endgame/egg-op1-hid.d.ts.map +1 -0
- package/dist/drivers/endgame/egg-op1-hid.js +605 -0
- package/dist/drivers/endgame/egg-op1-hid.js.map +1 -0
- package/dist/drivers/endgame/egg-we-control.d.ts +42 -0
- package/dist/drivers/endgame/egg-we-control.d.ts.map +1 -0
- package/dist/drivers/endgame/egg-we-control.js +87 -0
- package/dist/drivers/endgame/egg-we-control.js.map +1 -0
- package/dist/drivers/endgame/egg-we-hid.d.ts +58 -0
- package/dist/drivers/endgame/egg-we-hid.d.ts.map +1 -0
- package/dist/drivers/endgame/egg-we-hid.js +514 -0
- package/dist/drivers/endgame/egg-we-hid.js.map +1 -0
- package/dist/drivers/fantech/hid.d.ts +106 -0
- package/dist/drivers/fantech/hid.d.ts.map +1 -0
- package/dist/drivers/fantech/hid.js +295 -0
- package/dist/drivers/fantech/hid.js.map +1 -0
- package/dist/drivers/finalmouse/hid.d.ts +31 -0
- package/dist/drivers/finalmouse/hid.d.ts.map +1 -0
- package/dist/drivers/finalmouse/hid.js +181 -0
- package/dist/drivers/finalmouse/hid.js.map +1 -0
- package/dist/drivers/gearhub/hid.d.ts +191 -0
- package/dist/drivers/gearhub/hid.d.ts.map +1 -0
- package/dist/drivers/gearhub/hid.js +542 -0
- package/dist/drivers/gearhub/hid.js.map +1 -0
- package/dist/drivers/glorious/classic-hid.d.ts +62 -0
- package/dist/drivers/glorious/classic-hid.d.ts.map +1 -0
- package/dist/drivers/glorious/classic-hid.js +326 -0
- package/dist/drivers/glorious/classic-hid.js.map +1 -0
- package/dist/drivers/glorious/hid.d.ts +39 -0
- package/dist/drivers/glorious/hid.d.ts.map +1 -0
- package/dist/drivers/glorious/hid.js +203 -0
- package/dist/drivers/glorious/hid.js.map +1 -0
- package/dist/drivers/gwolves/hid.d.ts +27 -0
- package/dist/drivers/gwolves/hid.d.ts.map +1 -0
- package/dist/drivers/gwolves/hid.js +225 -0
- package/dist/drivers/gwolves/hid.js.map +1 -0
- package/dist/drivers/gwolves/products.d.ts +17 -0
- package/dist/drivers/gwolves/products.d.ts.map +1 -0
- package/dist/drivers/gwolves/products.js +58 -0
- package/dist/drivers/gwolves/products.js.map +1 -0
- package/dist/drivers/hyperx/hid.d.ts +59 -0
- package/dist/drivers/hyperx/hid.d.ts.map +1 -0
- package/dist/drivers/hyperx/hid.js +229 -0
- package/dist/drivers/hyperx/hid.js.map +1 -0
- package/dist/drivers/incott/hid.d.ts +513 -0
- package/dist/drivers/incott/hid.d.ts.map +1 -0
- package/dist/drivers/incott/hid.js +1173 -0
- package/dist/drivers/incott/hid.js.map +1 -0
- package/dist/drivers/index.d.ts +5 -0
- package/dist/drivers/index.d.ts.map +1 -0
- package/dist/drivers/index.js +5 -0
- package/dist/drivers/index.js.map +1 -0
- package/dist/drivers/keychron/m6-hid.d.ts +81 -0
- package/dist/drivers/keychron/m6-hid.d.ts.map +1 -0
- package/dist/drivers/keychron/m6-hid.js +486 -0
- package/dist/drivers/keychron/m6-hid.js.map +1 -0
- package/dist/drivers/keychron/nape-hid.d.ts +60 -0
- package/dist/drivers/keychron/nape-hid.d.ts.map +1 -0
- package/dist/drivers/keychron/nape-hid.js +432 -0
- package/dist/drivers/keychron/nape-hid.js.map +1 -0
- package/dist/drivers/ksnake/hid.d.ts +74 -0
- package/dist/drivers/ksnake/hid.d.ts.map +1 -0
- package/dist/drivers/ksnake/hid.js +368 -0
- package/dist/drivers/ksnake/hid.js.map +1 -0
- package/dist/drivers/lamzu/hid.d.ts +58 -0
- package/dist/drivers/lamzu/hid.d.ts.map +1 -0
- package/dist/drivers/lamzu/hid.js +414 -0
- package/dist/drivers/lamzu/hid.js.map +1 -0
- package/dist/drivers/lamzu-atlantis/hid.d.ts +148 -0
- package/dist/drivers/lamzu-atlantis/hid.d.ts.map +1 -0
- package/dist/drivers/lamzu-atlantis/hid.js +587 -0
- package/dist/drivers/lamzu-atlantis/hid.js.map +1 -0
- package/dist/drivers/logitech/bolt.d.ts +41 -0
- package/dist/drivers/logitech/bolt.d.ts.map +1 -0
- package/dist/drivers/logitech/bolt.js +105 -0
- package/dist/drivers/logitech/bolt.js.map +1 -0
- package/dist/drivers/logitech/hidpp.d.ts +525 -0
- package/dist/drivers/logitech/hidpp.d.ts.map +1 -0
- package/dist/drivers/logitech/hidpp.js +2774 -0
- package/dist/drivers/logitech/hidpp.js.map +1 -0
- package/dist/drivers/logitech/mode-status.d.ts +53 -0
- package/dist/drivers/logitech/mode-status.d.ts.map +1 -0
- package/dist/drivers/logitech/mode-status.js +52 -0
- package/dist/drivers/logitech/mode-status.js.map +1 -0
- package/dist/drivers/logitech/onboard-profiles.d.ts +298 -0
- package/dist/drivers/logitech/onboard-profiles.d.ts.map +1 -0
- package/dist/drivers/logitech/onboard-profiles.js +965 -0
- package/dist/drivers/logitech/onboard-profiles.js.map +1 -0
- package/dist/drivers/logitech/rgb-effects.d.ts +20 -0
- package/dist/drivers/logitech/rgb-effects.d.ts.map +1 -0
- package/dist/drivers/logitech/rgb-effects.js +93 -0
- package/dist/drivers/logitech/rgb-effects.js.map +1 -0
- package/dist/drivers/mchose/a5-gen1-hid.d.ts +36 -0
- package/dist/drivers/mchose/a5-gen1-hid.d.ts.map +1 -0
- package/dist/drivers/mchose/a5-gen1-hid.js +219 -0
- package/dist/drivers/mchose/a5-gen1-hid.js.map +1 -0
- package/dist/drivers/mchose/dock-hid.d.ts +26 -0
- package/dist/drivers/mchose/dock-hid.d.ts.map +1 -0
- package/dist/drivers/mchose/dock-hid.js +176 -0
- package/dist/drivers/mchose/dock-hid.js.map +1 -0
- package/dist/drivers/mchose/hid.d.ts +118 -0
- package/dist/drivers/mchose/hid.d.ts.map +1 -0
- package/dist/drivers/mchose/hid.js +550 -0
- package/dist/drivers/mchose/hid.js.map +1 -0
- package/dist/drivers/mchose/v3-hid.d.ts +109 -0
- package/dist/drivers/mchose/v3-hid.d.ts.map +1 -0
- package/dist/drivers/mchose/v3-hid.js +572 -0
- package/dist/drivers/mchose/v3-hid.js.map +1 -0
- package/dist/drivers/microsoft/hid.d.ts +25 -0
- package/dist/drivers/microsoft/hid.d.ts.map +1 -0
- package/dist/drivers/microsoft/hid.js +247 -0
- package/dist/drivers/microsoft/hid.js.map +1 -0
- package/dist/drivers/moddo/hid.d.ts +31 -0
- package/dist/drivers/moddo/hid.d.ts.map +1 -0
- package/dist/drivers/moddo/hid.js +154 -0
- package/dist/drivers/moddo/hid.js.map +1 -0
- package/dist/drivers/mouse-types.d.ts +388 -0
- package/dist/drivers/mouse-types.d.ts.map +1 -0
- package/dist/drivers/mouse-types.js +2 -0
- package/dist/drivers/mouse-types.js.map +1 -0
- package/dist/drivers/ninjutso/hid.d.ts +62 -0
- package/dist/drivers/ninjutso/hid.d.ts.map +1 -0
- package/dist/drivers/ninjutso/hid.js +680 -0
- package/dist/drivers/ninjutso/hid.js.map +1 -0
- package/dist/drivers/orbital/hid.d.ts +24 -0
- package/dist/drivers/orbital/hid.d.ts.map +1 -0
- package/dist/drivers/orbital/hid.js +85 -0
- package/dist/drivers/orbital/hid.js.map +1 -0
- package/dist/drivers/orbital/host-protocol.d.ts +59 -0
- package/dist/drivers/orbital/host-protocol.d.ts.map +1 -0
- package/dist/drivers/orbital/host-protocol.js +884 -0
- package/dist/drivers/orbital/host-protocol.js.map +1 -0
- package/dist/drivers/pulsar/pulsar-hid.d.ts +63 -0
- package/dist/drivers/pulsar/pulsar-hid.d.ts.map +1 -0
- package/dist/drivers/pulsar/pulsar-hid.js +381 -0
- package/dist/drivers/pulsar/pulsar-hid.js.map +1 -0
- package/dist/drivers/pulsar/pulsar-pro-hid.d.ts +46 -0
- package/dist/drivers/pulsar/pulsar-pro-hid.d.ts.map +1 -0
- package/dist/drivers/pulsar/pulsar-pro-hid.js +343 -0
- package/dist/drivers/pulsar/pulsar-pro-hid.js.map +1 -0
- package/dist/drivers/pulsar/pulsar-xs1-hid.d.ts +40 -0
- package/dist/drivers/pulsar/pulsar-xs1-hid.d.ts.map +1 -0
- package/dist/drivers/pulsar/pulsar-xs1-hid.js +251 -0
- package/dist/drivers/pulsar/pulsar-xs1-hid.js.map +1 -0
- package/dist/drivers/rawm/hid.d.ts +29 -0
- package/dist/drivers/rawm/hid.d.ts.map +1 -0
- package/dist/drivers/rawm/hid.js +210 -0
- package/dist/drivers/rawm/hid.js.map +1 -0
- package/dist/drivers/razer/cobra-hid.d.ts +63 -0
- package/dist/drivers/razer/cobra-hid.d.ts.map +1 -0
- package/dist/drivers/razer/cobra-hid.js +282 -0
- package/dist/drivers/razer/cobra-hid.js.map +1 -0
- package/dist/drivers/razer/hid-open.d.ts +13 -0
- package/dist/drivers/razer/hid-open.d.ts.map +1 -0
- package/dist/drivers/razer/hid-open.js +29 -0
- package/dist/drivers/razer/hid-open.js.map +1 -0
- package/dist/drivers/razer/hid.d.ts +231 -0
- package/dist/drivers/razer/hid.d.ts.map +1 -0
- package/dist/drivers/razer/hid.js +772 -0
- package/dist/drivers/razer/hid.js.map +1 -0
- package/dist/drivers/razer/viper-hid.d.ts +33 -0
- package/dist/drivers/razer/viper-hid.d.ts.map +1 -0
- package/dist/drivers/razer/viper-hid.js +177 -0
- package/dist/drivers/razer/viper-hid.js.map +1 -0
- package/dist/drivers/razer/viper-mini-hid.d.ts +58 -0
- package/dist/drivers/razer/viper-mini-hid.d.ts.map +1 -0
- package/dist/drivers/razer/viper-mini-hid.js +273 -0
- package/dist/drivers/razer/viper-mini-hid.js.map +1 -0
- package/dist/drivers/razer/viper-v4-pro-hid.d.ts +26 -0
- package/dist/drivers/razer/viper-v4-pro-hid.d.ts.map +1 -0
- package/dist/drivers/razer/viper-v4-pro-hid.js +154 -0
- package/dist/drivers/razer/viper-v4-pro-hid.js.map +1 -0
- package/dist/drivers/registry.d.ts +70 -0
- package/dist/drivers/registry.d.ts.map +1 -0
- package/dist/drivers/registry.js +146 -0
- package/dist/drivers/registry.js.map +1 -0
- package/dist/drivers/steelseries/aerox3-hid.d.ts +53 -0
- package/dist/drivers/steelseries/aerox3-hid.d.ts.map +1 -0
- package/dist/drivers/steelseries/aerox3-hid.js +172 -0
- package/dist/drivers/steelseries/aerox3-hid.js.map +1 -0
- package/dist/drivers/steelseries/aerox5-hid.d.ts +54 -0
- package/dist/drivers/steelseries/aerox5-hid.d.ts.map +1 -0
- package/dist/drivers/steelseries/aerox5-hid.js +173 -0
- package/dist/drivers/steelseries/aerox5-hid.js.map +1 -0
- package/dist/drivers/steelseries/aerox5-wireless-hid.d.ts +69 -0
- package/dist/drivers/steelseries/aerox5-wireless-hid.d.ts.map +1 -0
- package/dist/drivers/steelseries/aerox5-wireless-hid.js +234 -0
- package/dist/drivers/steelseries/aerox5-wireless-hid.js.map +1 -0
- package/dist/drivers/steelseries/aerox9-wireless-hid.d.ts +70 -0
- package/dist/drivers/steelseries/aerox9-wireless-hid.d.ts.map +1 -0
- package/dist/drivers/steelseries/aerox9-wireless-hid.js +227 -0
- package/dist/drivers/steelseries/aerox9-wireless-hid.js.map +1 -0
- package/dist/drivers/steelseries/hid.d.ts +48 -0
- package/dist/drivers/steelseries/hid.d.ts.map +1 -0
- package/dist/drivers/steelseries/hid.js +157 -0
- package/dist/drivers/steelseries/hid.js.map +1 -0
- package/dist/drivers/steelseries/prime-mini-wireless-hid.d.ts +62 -0
- package/dist/drivers/steelseries/prime-mini-wireless-hid.d.ts.map +1 -0
- package/dist/drivers/steelseries/prime-mini-wireless-hid.js +215 -0
- package/dist/drivers/steelseries/prime-mini-wireless-hid.js.map +1 -0
- package/dist/drivers/steelseries/prime-plus-hid.d.ts +51 -0
- package/dist/drivers/steelseries/prime-plus-hid.d.ts.map +1 -0
- package/dist/drivers/steelseries/prime-plus-hid.js +150 -0
- package/dist/drivers/steelseries/prime-plus-hid.js.map +1 -0
- package/dist/drivers/steelseries/rival3-wireless-hid.d.ts +61 -0
- package/dist/drivers/steelseries/rival3-wireless-hid.d.ts.map +1 -0
- package/dist/drivers/steelseries/rival3-wireless-hid.js +185 -0
- package/dist/drivers/steelseries/rival3-wireless-hid.js.map +1 -0
- package/dist/drivers/steelseries/rival310-hid.d.ts +59 -0
- package/dist/drivers/steelseries/rival310-hid.d.ts.map +1 -0
- package/dist/drivers/steelseries/rival310-hid.js +182 -0
- package/dist/drivers/steelseries/rival310-hid.js.map +1 -0
- package/dist/drivers/steelseries/rival650-hid.d.ts +68 -0
- package/dist/drivers/steelseries/rival650-hid.d.ts.map +1 -0
- package/dist/drivers/steelseries/rival650-hid.js +209 -0
- package/dist/drivers/steelseries/rival650-hid.js.map +1 -0
- package/dist/drivers/steelseries/sensei-ten-hid.d.ts +62 -0
- package/dist/drivers/steelseries/sensei-ten-hid.d.ts.map +1 -0
- package/dist/drivers/steelseries/sensei-ten-hid.js +186 -0
- package/dist/drivers/steelseries/sensei-ten-hid.js.map +1 -0
- package/dist/drivers/teevolution/hid.d.ts +82 -0
- package/dist/drivers/teevolution/hid.d.ts.map +1 -0
- package/dist/drivers/teevolution/hid.js +607 -0
- package/dist/drivers/teevolution/hid.js.map +1 -0
- package/dist/drivers/vendors.d.ts +254 -0
- package/dist/drivers/vendors.d.ts.map +1 -0
- package/dist/drivers/vendors.js +587 -0
- package/dist/drivers/vendors.js.map +1 -0
- package/dist/drivers/vgn/hid.d.ts +33 -0
- package/dist/drivers/vgn/hid.d.ts.map +1 -0
- package/dist/drivers/vgn/hid.js +213 -0
- package/dist/drivers/vgn/hid.js.map +1 -0
- package/dist/drivers/wallhack/keyboard-hid.d.ts +28 -0
- package/dist/drivers/wallhack/keyboard-hid.d.ts.map +1 -0
- package/dist/drivers/wallhack/keyboard-hid.js +80 -0
- package/dist/drivers/wallhack/keyboard-hid.js.map +1 -0
- package/dist/drivers/wallhack/mouse-hid.d.ts +45 -0
- package/dist/drivers/wallhack/mouse-hid.d.ts.map +1 -0
- package/dist/drivers/wallhack/mouse-hid.js +288 -0
- package/dist/drivers/wallhack/mouse-hid.js.map +1 -0
- package/dist/drivers/webhid.d.ts +59 -0
- package/dist/drivers/webhid.d.ts.map +1 -0
- package/dist/drivers/webhid.js +2 -0
- package/dist/drivers/webhid.js.map +1 -0
- package/dist/drivers/wlmouse/hid.d.ts +81 -0
- package/dist/drivers/wlmouse/hid.d.ts.map +1 -0
- package/dist/drivers/wlmouse/hid.js +576 -0
- package/dist/drivers/wlmouse/hid.js.map +1 -0
- package/dist/drivers/wooting/hid.d.ts +86 -0
- package/dist/drivers/wooting/hid.d.ts.map +1 -0
- package/dist/drivers/wooting/hid.js +320 -0
- package/dist/drivers/wooting/hid.js.map +1 -0
- package/dist/drivers/zaunkoenig/hid.d.ts +31 -0
- package/dist/drivers/zaunkoenig/hid.d.ts.map +1 -0
- package/dist/drivers/zaunkoenig/hid.js +162 -0
- package/dist/drivers/zaunkoenig/hid.js.map +1 -0
- package/dist/endgame-gear/op1.d.ts +165 -0
- package/dist/endgame-gear/op1.d.ts.map +1 -0
- package/dist/endgame-gear/op1.js +384 -0
- package/dist/endgame-gear/op1.js.map +1 -0
- package/dist/endgame-gear/wireless.d.ts +93 -0
- package/dist/endgame-gear/wireless.d.ts.map +1 -0
- package/dist/endgame-gear/wireless.js +242 -0
- package/dist/endgame-gear/wireless.js.map +1 -0
- package/dist/fantech/index.d.ts +9 -0
- package/dist/fantech/index.d.ts.map +1 -0
- package/dist/fantech/index.js +11 -0
- package/dist/fantech/index.js.map +1 -0
- package/dist/finalmouse/index.d.ts +41 -0
- package/dist/finalmouse/index.d.ts.map +1 -0
- package/dist/finalmouse/index.js +106 -0
- package/dist/finalmouse/index.js.map +1 -0
- package/dist/gearhub/index.d.ts +210 -0
- package/dist/gearhub/index.d.ts.map +1 -0
- package/dist/gearhub/index.js +282 -0
- package/dist/gearhub/index.js.map +1 -0
- package/dist/glorious/index.d.ts +89 -0
- package/dist/glorious/index.d.ts.map +1 -0
- package/dist/glorious/index.js +236 -0
- package/dist/glorious/index.js.map +1 -0
- package/dist/glorious-classic/index.d.ts +103 -0
- package/dist/glorious-classic/index.d.ts.map +1 -0
- package/dist/glorious-classic/index.js +304 -0
- package/dist/glorious-classic/index.js.map +1 -0
- package/dist/gwolves/index.d.ts +82 -0
- package/dist/gwolves/index.d.ts.map +1 -0
- package/dist/gwolves/index.js +197 -0
- package/dist/gwolves/index.js.map +1 -0
- package/dist/hyperx/index.d.ts +181 -0
- package/dist/hyperx/index.d.ts.map +1 -0
- package/dist/hyperx/index.js +303 -0
- package/dist/hyperx/index.js.map +1 -0
- package/dist/incott/index.d.ts +1067 -0
- package/dist/incott/index.d.ts.map +1 -0
- package/dist/incott/index.js +1482 -0
- package/dist/incott/index.js.map +1 -0
- package/dist/index.d.ts +30 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +30 -0
- package/dist/index.js.map +1 -0
- package/dist/keychron/index.d.ts +194 -0
- package/dist/keychron/index.d.ts.map +1 -0
- package/dist/keychron/index.js +341 -0
- package/dist/keychron/index.js.map +1 -0
- package/dist/ksnake/index.d.ts +157 -0
- package/dist/ksnake/index.d.ts.map +1 -0
- package/dist/ksnake/index.js +314 -0
- package/dist/ksnake/index.js.map +1 -0
- package/dist/lamzu/atlantis.d.ts +237 -0
- package/dist/lamzu/atlantis.d.ts.map +1 -0
- package/dist/lamzu/atlantis.js +263 -0
- package/dist/lamzu/atlantis.js.map +1 -0
- package/dist/lamzu/index.d.ts +60 -0
- package/dist/lamzu/index.d.ts.map +1 -0
- package/dist/lamzu/index.js +86 -0
- package/dist/lamzu/index.js.map +1 -0
- package/dist/logitech/controls.d.ts +138 -0
- package/dist/logitech/controls.d.ts.map +1 -0
- package/dist/logitech/controls.js +184 -0
- package/dist/logitech/controls.js.map +1 -0
- package/dist/logitech/friendly-name.d.ts +50 -0
- package/dist/logitech/friendly-name.d.ts.map +1 -0
- package/dist/logitech/friendly-name.js +74 -0
- package/dist/logitech/friendly-name.js.map +1 -0
- package/dist/logitech/haptics.d.ts +97 -0
- package/dist/logitech/haptics.d.ts.map +1 -0
- package/dist/logitech/haptics.js +116 -0
- package/dist/logitech/haptics.js.map +1 -0
- package/dist/logitech/hosts.d.ts +55 -0
- package/dist/logitech/hosts.d.ts.map +1 -0
- package/dist/logitech/hosts.js +80 -0
- package/dist/logitech/hosts.js.map +1 -0
- package/dist/logitech/index.d.ts +127 -0
- package/dist/logitech/index.d.ts.map +1 -0
- package/dist/logitech/index.js +233 -0
- package/dist/logitech/index.js.map +1 -0
- package/dist/logitech/wheel.d.ts +117 -0
- package/dist/logitech/wheel.d.ts.map +1 -0
- package/dist/logitech/wheel.js +133 -0
- package/dist/logitech/wheel.js.map +1 -0
- package/dist/mchose/a5-gen1.d.ts +38 -0
- package/dist/mchose/a5-gen1.d.ts.map +1 -0
- package/dist/mchose/a5-gen1.js +60 -0
- package/dist/mchose/a5-gen1.js.map +1 -0
- package/dist/mchose/buttons.d.ts +66 -0
- package/dist/mchose/buttons.d.ts.map +1 -0
- package/dist/mchose/buttons.js +184 -0
- package/dist/mchose/buttons.js.map +1 -0
- package/dist/mchose/dock.d.ts +77 -0
- package/dist/mchose/dock.d.ts.map +1 -0
- package/dist/mchose/dock.js +133 -0
- package/dist/mchose/dock.js.map +1 -0
- package/dist/mchose/index.d.ts +299 -0
- package/dist/mchose/index.d.ts.map +1 -0
- package/dist/mchose/index.js +429 -0
- package/dist/mchose/index.js.map +1 -0
- package/dist/mchose/v3-buttons.d.ts +64 -0
- package/dist/mchose/v3-buttons.d.ts.map +1 -0
- package/dist/mchose/v3-buttons.js +258 -0
- package/dist/mchose/v3-buttons.js.map +1 -0
- package/dist/mchose/v3.d.ts +380 -0
- package/dist/mchose/v3.d.ts.map +1 -0
- package/dist/mchose/v3.js +608 -0
- package/dist/mchose/v3.js.map +1 -0
- package/dist/microsoft/index.d.ts +19 -0
- package/dist/microsoft/index.d.ts.map +1 -0
- package/dist/microsoft/index.js +22 -0
- package/dist/microsoft/index.js.map +1 -0
- package/dist/moddo/index.d.ts +72 -0
- package/dist/moddo/index.d.ts.map +1 -0
- package/dist/moddo/index.js +147 -0
- package/dist/moddo/index.js.map +1 -0
- package/dist/ninjutso/index.d.ts +74 -0
- package/dist/ninjutso/index.d.ts.map +1 -0
- package/dist/ninjutso/index.js +133 -0
- package/dist/ninjutso/index.js.map +1 -0
- package/dist/orbital/index.d.ts +14 -0
- package/dist/orbital/index.d.ts.map +1 -0
- package/dist/orbital/index.js +19 -0
- package/dist/orbital/index.js.map +1 -0
- package/dist/pulsar/index.d.ts +81 -0
- package/dist/pulsar/index.d.ts.map +1 -0
- package/dist/pulsar/index.js +185 -0
- package/dist/pulsar/index.js.map +1 -0
- package/dist/rawm/index.d.ts +55 -0
- package/dist/rawm/index.d.ts.map +1 -0
- package/dist/rawm/index.js +229 -0
- package/dist/rawm/index.js.map +1 -0
- package/dist/razer/codec.d.ts +504 -0
- package/dist/razer/codec.d.ts.map +1 -0
- package/dist/razer/codec.js +648 -0
- package/dist/razer/codec.js.map +1 -0
- package/dist/razer/devices.d.ts +156 -0
- package/dist/razer/devices.d.ts.map +1 -0
- package/dist/razer/devices.js +540 -0
- package/dist/razer/devices.js.map +1 -0
- package/dist/razer/index.d.ts +2 -0
- package/dist/razer/index.d.ts.map +1 -0
- package/dist/razer/index.js +2 -0
- package/dist/razer/index.js.map +1 -0
- package/dist/razer/v4.d.ts +19 -0
- package/dist/razer/v4.d.ts.map +1 -0
- package/dist/razer/v4.js +51 -0
- package/dist/razer/v4.js.map +1 -0
- package/dist/steelseries/aerox3.d.ts +236 -0
- package/dist/steelseries/aerox3.d.ts.map +1 -0
- package/dist/steelseries/aerox3.js +311 -0
- package/dist/steelseries/aerox3.js.map +1 -0
- package/dist/steelseries/aerox5-wireless.d.ts +300 -0
- package/dist/steelseries/aerox5-wireless.d.ts.map +1 -0
- package/dist/steelseries/aerox5-wireless.js +389 -0
- package/dist/steelseries/aerox5-wireless.js.map +1 -0
- package/dist/steelseries/aerox5.d.ts +228 -0
- package/dist/steelseries/aerox5.d.ts.map +1 -0
- package/dist/steelseries/aerox5.js +294 -0
- package/dist/steelseries/aerox5.js.map +1 -0
- package/dist/steelseries/aerox9-wireless.d.ts +213 -0
- package/dist/steelseries/aerox9-wireless.d.ts.map +1 -0
- package/dist/steelseries/aerox9-wireless.js +305 -0
- package/dist/steelseries/aerox9-wireless.js.map +1 -0
- package/dist/steelseries/devices.d.ts +82 -0
- package/dist/steelseries/devices.d.ts.map +1 -0
- package/dist/steelseries/devices.js +310 -0
- package/dist/steelseries/devices.js.map +1 -0
- package/dist/steelseries/index.d.ts +13 -0
- package/dist/steelseries/index.d.ts.map +1 -0
- package/dist/steelseries/index.js +13 -0
- package/dist/steelseries/index.js.map +1 -0
- package/dist/steelseries/prime-mini-wireless.d.ts +253 -0
- package/dist/steelseries/prime-mini-wireless.d.ts.map +1 -0
- package/dist/steelseries/prime-mini-wireless.js +351 -0
- package/dist/steelseries/prime-mini-wireless.js.map +1 -0
- package/dist/steelseries/prime-plus.d.ts +179 -0
- package/dist/steelseries/prime-plus.d.ts.map +1 -0
- package/dist/steelseries/prime-plus.js +275 -0
- package/dist/steelseries/prime-plus.js.map +1 -0
- package/dist/steelseries/rival3-wireless.d.ts +222 -0
- package/dist/steelseries/rival3-wireless.d.ts.map +1 -0
- package/dist/steelseries/rival3-wireless.js +308 -0
- package/dist/steelseries/rival3-wireless.js.map +1 -0
- package/dist/steelseries/rival3.d.ts +99 -0
- package/dist/steelseries/rival3.d.ts.map +1 -0
- package/dist/steelseries/rival3.js +147 -0
- package/dist/steelseries/rival3.js.map +1 -0
- package/dist/steelseries/rival310.d.ts +230 -0
- package/dist/steelseries/rival310.d.ts.map +1 -0
- package/dist/steelseries/rival310.js +322 -0
- package/dist/steelseries/rival310.js.map +1 -0
- package/dist/steelseries/rival650.d.ts +215 -0
- package/dist/steelseries/rival650.d.ts.map +1 -0
- package/dist/steelseries/rival650.js +284 -0
- package/dist/steelseries/rival650.js.map +1 -0
- package/dist/steelseries/sensei-ten.d.ts +283 -0
- package/dist/steelseries/sensei-ten.d.ts.map +1 -0
- package/dist/steelseries/sensei-ten.js +389 -0
- package/dist/steelseries/sensei-ten.js.map +1 -0
- package/dist/teevolution/index.d.ts +211 -0
- package/dist/teevolution/index.d.ts.map +1 -0
- package/dist/teevolution/index.js +458 -0
- package/dist/teevolution/index.js.map +1 -0
- package/dist/valkyrie/index.d.ts +19 -0
- package/dist/valkyrie/index.d.ts.map +1 -0
- package/dist/valkyrie/index.js +43 -0
- package/dist/valkyrie/index.js.map +1 -0
- package/dist/valkyrie/settings.d.ts +28 -0
- package/dist/valkyrie/settings.d.ts.map +1 -0
- package/dist/valkyrie/settings.js +84 -0
- package/dist/valkyrie/settings.js.map +1 -0
- package/dist/vgn/index.d.ts +59 -0
- package/dist/vgn/index.d.ts.map +1 -0
- package/dist/vgn/index.js +165 -0
- package/dist/vgn/index.js.map +1 -0
- package/dist/wallhack/index.d.ts +165 -0
- package/dist/wallhack/index.d.ts.map +1 -0
- package/dist/wallhack/index.js +226 -0
- package/dist/wallhack/index.js.map +1 -0
- package/dist/wlmouse/index.d.ts +4 -0
- package/dist/wlmouse/index.d.ts.map +1 -0
- package/dist/wlmouse/index.js +7 -0
- package/dist/wlmouse/index.js.map +1 -0
- package/dist/wooting/index.d.ts +225 -0
- package/dist/wooting/index.d.ts.map +1 -0
- package/dist/wooting/index.js +296 -0
- package/dist/wooting/index.js.map +1 -0
- package/dist/zaunkoenig/index.d.ts +49 -0
- package/dist/zaunkoenig/index.d.ts.map +1 -0
- package/dist/zaunkoenig/index.js +127 -0
- package/dist/zaunkoenig/index.js.map +1 -0
- package/package.json +193 -0
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WALLHACK device codec — wire format for the WALLHACK M-001 mouse and K-001
|
|
3
|
+
* keyboard, reverse-engineered from the WALLHACK Terminal WebHID app
|
|
4
|
+
* (terminal.wallhack.com). Pure functions only: packet builders and response
|
|
5
|
+
* decoders, no I/O. The WebHID drivers live in ../drivers/wallhack.
|
|
6
|
+
*
|
|
7
|
+
* Transport (shared): output on **report id 4**, fixed **63-byte** reports,
|
|
8
|
+
* zero-padded. Responses arrive as input reports with the command code echoed at
|
|
9
|
+
* byte 2 and, for function-area reads, the 16-bit little-endian address echoed at
|
|
10
|
+
* bytes 4-5 and the payload from byte 7.
|
|
11
|
+
*
|
|
12
|
+
* The two devices are told apart by their command interface's HID usage page:
|
|
13
|
+
* the mouse answers on 0xFF1C, the keyboard on 0xFFA0.
|
|
14
|
+
*/
|
|
15
|
+
export const WALLHACK_VENDOR_ID = 0x3879; // 14457
|
|
16
|
+
/** A second vendor id some K-001 units enumerate under (the switch-matrix MCU). */
|
|
17
|
+
export const WALLHACK_KEYBOARD_ALT_VENDOR_ID = 0x1caa; // 7338
|
|
18
|
+
/** M-001 mouse: real config PID and the in-app demo PID. */
|
|
19
|
+
export const WALLHACK_MOUSE_PRODUCT_IDS = new Set([0x1110, 0x0807]);
|
|
20
|
+
/** K-001 keyboard PID (shared across both keyboard vendor ids). */
|
|
21
|
+
export const WALLHACK_KEYBOARD_PRODUCT_IDS = new Set([0x0806]);
|
|
22
|
+
/** Command-interface usage pages, from the app's `CS` map. */
|
|
23
|
+
export const WALLHACK_MOUSE_USAGE_PAGE = 0xff1c; // 65308
|
|
24
|
+
export const WALLHACK_MOUSE_USAGE = 0x92; // 146
|
|
25
|
+
export const WALLHACK_KEYBOARD_USAGE_PAGE = 0xffa0; // 65440
|
|
26
|
+
export const WALLHACK_KEYBOARD_USAGE = 0x01;
|
|
27
|
+
/** Every report is sent under this report id and is this many bytes long. */
|
|
28
|
+
export const WALLHACK_REPORT_ID = 4;
|
|
29
|
+
export const WALLHACK_REPORT_LENGTH = 63;
|
|
30
|
+
/**
|
|
31
|
+
* Mouse command codes (`Pt`). The function-area pair reads/writes the config
|
|
32
|
+
* map (`WALLHACK_FLASH`); the rest are direct queries and actions.
|
|
33
|
+
*/
|
|
34
|
+
export const WALLHACK_COMMAND = {
|
|
35
|
+
checkConn: 0xa0,
|
|
36
|
+
fastBegin: 0xa1,
|
|
37
|
+
fastEnd: 0xa2,
|
|
38
|
+
getBasicInfo: 0xa3,
|
|
39
|
+
readFunctionArea: 0xa4,
|
|
40
|
+
writeFunctionArea: 0xa5,
|
|
41
|
+
getDefaultKeys: 0xa6,
|
|
42
|
+
getKeys: 0xa7,
|
|
43
|
+
setKeys: 0xa8,
|
|
44
|
+
getLighting: 0xa9,
|
|
45
|
+
setLighting: 0xaa,
|
|
46
|
+
factoryReset: 0xab,
|
|
47
|
+
getMacro: 0xac,
|
|
48
|
+
setMacro: 0xad,
|
|
49
|
+
pair: 0xae,
|
|
50
|
+
clearPairing: 0xaf,
|
|
51
|
+
testColor: 0xb0,
|
|
52
|
+
readMouseChipId: 0xb8,
|
|
53
|
+
readDongleChipId: 0xb9,
|
|
54
|
+
battery: 0xba,
|
|
55
|
+
readVersion: 0xbc,
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Byte offsets into the mouse config "function area" (`We`). Each named field is
|
|
59
|
+
* a single byte unless noted. `dpi8Block` is the base of the per-stage DPI
|
|
60
|
+
* records.
|
|
61
|
+
*/
|
|
62
|
+
export const WALLHACK_FLASH = {
|
|
63
|
+
profileIndex: 0,
|
|
64
|
+
ledMode: 1,
|
|
65
|
+
ledLight: 2,
|
|
66
|
+
reportEsb: 10, // wireless (2.4 GHz) polling rank
|
|
67
|
+
reportUsb: 11, // wired polling rank
|
|
68
|
+
dpiRank: 12, // active DPI stage (0-based)
|
|
69
|
+
dpi8Block: 77, // base of the 8 DPI-stage records
|
|
70
|
+
reportUser: 104,
|
|
71
|
+
sleepTime: 105,
|
|
72
|
+
deepSleepTime: 107,
|
|
73
|
+
keyDebounceTime: 109,
|
|
74
|
+
silentHeight: 110, // lift-off distance
|
|
75
|
+
angleSnapEnable: 111,
|
|
76
|
+
rippleControlEnable: 112,
|
|
77
|
+
motionSyncEnable: 113,
|
|
78
|
+
turnOffAutomaticSleep: 114,
|
|
79
|
+
angleTuneValue: 115,
|
|
80
|
+
gameMode: 116,
|
|
81
|
+
};
|
|
82
|
+
/** Polling-rate rank → Hz (`Z1`). Same table for wired and wireless. */
|
|
83
|
+
export const WALLHACK_POLLING_BY_RANK = {
|
|
84
|
+
0: 125, 1: 250, 2: 500, 3: 1000, 4: 1500, 5: 2000, 6: 2500, 7: 3000,
|
|
85
|
+
8: 3500, 9: 4000, 10: 4500, 11: 5000, 12: 5500, 13: 6000, 14: 6500,
|
|
86
|
+
15: 7000, 16: 7500, 17: 8000,
|
|
87
|
+
};
|
|
88
|
+
/** Full list of selectable polling rates, in Hz (`jm`). */
|
|
89
|
+
export const WALLHACK_POLLING_RATES = Object.values(WALLHACK_POLLING_BY_RANK);
|
|
90
|
+
/** Lift-off-distance code → millimetres (`s6`). */
|
|
91
|
+
export const WALLHACK_LOD_MM_BY_CODE = { 0: 0.7, 1: 1, 2: 2 };
|
|
92
|
+
export function wallhackPollingRankToHz(rank) {
|
|
93
|
+
return WALLHACK_POLLING_BY_RANK[rank] ?? null;
|
|
94
|
+
}
|
|
95
|
+
export function wallhackPollingHzToRank(hz) {
|
|
96
|
+
for (const [rank, value] of Object.entries(WALLHACK_POLLING_BY_RANK)) {
|
|
97
|
+
if (value === hz)
|
|
98
|
+
return Number(rank);
|
|
99
|
+
}
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Lift-off code (0/1/2) → OpenMouse's three-stop LOD. The device's three heights
|
|
104
|
+
* (0.7 / 1 / 2 mm) map onto Low / Medium / High in order.
|
|
105
|
+
*/
|
|
106
|
+
export function wallhackLodFromCode(code) {
|
|
107
|
+
switch (code) {
|
|
108
|
+
case 0: return "Low";
|
|
109
|
+
case 1: return "Medium";
|
|
110
|
+
case 2: return "High";
|
|
111
|
+
default: return null;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
export function wallhackLodToCode(lod) {
|
|
115
|
+
return lod === "Low" ? 0 : lod === "Medium" ? 1 : 2;
|
|
116
|
+
}
|
|
117
|
+
/** Human-facing product name for a device by product id. */
|
|
118
|
+
export function wallhackMouseName(_productId) {
|
|
119
|
+
return "WALLHACK M-001";
|
|
120
|
+
}
|
|
121
|
+
export function wallhackKeyboardName(_productId) {
|
|
122
|
+
return "WALLHACK K-001";
|
|
123
|
+
}
|
|
124
|
+
/** Pack `bytes` into a fresh zero-padded 63-byte report body (`as`). */
|
|
125
|
+
export function wallhackReport(bytes) {
|
|
126
|
+
const frame = new Uint8Array(WALLHACK_REPORT_LENGTH);
|
|
127
|
+
frame.set([...bytes].slice(0, WALLHACK_REPORT_LENGTH), 0);
|
|
128
|
+
return frame;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Build a simple (non-function-area) command: `[0, 0, command, ...args]` padded
|
|
132
|
+
* to the report length. Matches the app's `as(new Uint8Array([0, 0, cmd, …]))`.
|
|
133
|
+
*/
|
|
134
|
+
export function wallhackBuildSimple(command, args = []) {
|
|
135
|
+
return wallhackReport([0, 0, command, ...args]);
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Build a function-area read/write packet (`Ht`):
|
|
139
|
+
* `[0, 0, cmd, n, addrLo, addrHi, 0, ...payload]`, where `cmd` is
|
|
140
|
+
* READ/WRITE_FUNCTION_AREA, `n` is the payload length (write) or byte count
|
|
141
|
+
* (read), and `addr` is the 16-bit little-endian offset.
|
|
142
|
+
*/
|
|
143
|
+
export function wallhackBuildFunctionArea(write, address, n, payload = []) {
|
|
144
|
+
const command = write ? WALLHACK_COMMAND.writeFunctionArea : WALLHACK_COMMAND.readFunctionArea;
|
|
145
|
+
const header = [0, 0, command, n & 0xff, address & 0xff, (address >> 8) & 0xff, 0];
|
|
146
|
+
return wallhackReport([...header, ...payload]);
|
|
147
|
+
}
|
|
148
|
+
/** Read `count` bytes from the config map at `address`. */
|
|
149
|
+
export function wallhackBuildRead(address, count = 1) {
|
|
150
|
+
return wallhackBuildFunctionArea(false, address, count);
|
|
151
|
+
}
|
|
152
|
+
/** Write `payload` bytes to the config map at `address`. */
|
|
153
|
+
export function wallhackBuildWrite(address, payload) {
|
|
154
|
+
return wallhackBuildFunctionArea(true, address, payload.length, payload);
|
|
155
|
+
}
|
|
156
|
+
/** A DPI value as the two little-endian bytes the DPI-stage record stores. */
|
|
157
|
+
export function wallhackDpiBytes(dpi) {
|
|
158
|
+
return [dpi & 0xff, (dpi >> 8) & 0xff];
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* One DPI-stage record as written by the app (`sJ`):
|
|
162
|
+
* `[enabled, 0, dpiLo, dpiHi, 0x90, 1, colorHi, colorLo, 0]`. The trailing bytes
|
|
163
|
+
* are the stage's LED colour; the app writes 0x90/0xFFFF as defaults.
|
|
164
|
+
*/
|
|
165
|
+
export function wallhackBuildSetDpiStage(dpi) {
|
|
166
|
+
const [lo, hi] = wallhackDpiBytes(dpi);
|
|
167
|
+
return wallhackBuildWrite(WALLHACK_FLASH.dpi8Block, [1, 0, lo, hi, 0x90, 1, 0xff, 0xff, 0]);
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* A response is a valid reply for `command` when it echoes that command code at
|
|
171
|
+
* byte 2. (Bytes 0-1 are report framing / status.)
|
|
172
|
+
*/
|
|
173
|
+
export function wallhackIsReplyFor(response, command) {
|
|
174
|
+
return response.length > 2 && response[2] === command;
|
|
175
|
+
}
|
|
176
|
+
/** The function-area address a read/write response echoes back (bytes 4-5, LE). */
|
|
177
|
+
export function wallhackResponseAddress(response) {
|
|
178
|
+
if (response.length < 6)
|
|
179
|
+
return null;
|
|
180
|
+
return (response[4] | (response[5] << 8)) & 0xffff;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* The single config byte a function-area read returns. The payload begins at
|
|
184
|
+
* byte 7 (`gJ`, `fJ`, `mJ` all read `t[7]`).
|
|
185
|
+
*/
|
|
186
|
+
export function wallhackReadByte(response) {
|
|
187
|
+
if (response.length < 8)
|
|
188
|
+
return null;
|
|
189
|
+
return response[7];
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* The active DPI stage's value from a `dpi8Block` read. The stage record's DPI
|
|
193
|
+
* lives at payload bytes 2-3, i.e. response bytes 9-10, little-endian (`lJ`).
|
|
194
|
+
*/
|
|
195
|
+
export function wallhackReadDpi(response) {
|
|
196
|
+
if (response.length < 11)
|
|
197
|
+
return null;
|
|
198
|
+
return (response[9] | (response[10] << 8)) & 0xffff;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Decode a READ_VERSION reply (`rJ`): three big-endian 16-bit versions at bytes
|
|
202
|
+
* 7-8 (mouse), 9-10 (dongle), 11-12 (NXP), each rendered `major.minor`.
|
|
203
|
+
*/
|
|
204
|
+
export function wallhackDecodeVersions(response) {
|
|
205
|
+
if (response.length < 13)
|
|
206
|
+
return null;
|
|
207
|
+
const render = (hi, lo) => `${hi}.${lo}`;
|
|
208
|
+
return {
|
|
209
|
+
mouse: render(response[7], response[8]),
|
|
210
|
+
dongle: render(response[9], response[10]),
|
|
211
|
+
nxp: render(response[11], response[12]),
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Decode a BATTERY reply: percentage at byte 7, charging flag at byte 8. The
|
|
216
|
+
* exact byte positions are best-effort from the obfuscated bundle and want
|
|
217
|
+
* hardware confirmation; a percent outside 0-100 is treated as unknown.
|
|
218
|
+
*/
|
|
219
|
+
export function wallhackDecodeBattery(response) {
|
|
220
|
+
if (response.length < 9)
|
|
221
|
+
return null;
|
|
222
|
+
const raw = response[7];
|
|
223
|
+
const percent = raw >= 0 && raw <= 100 ? raw : null;
|
|
224
|
+
return { percent, charging: response[8] === 1 };
|
|
225
|
+
}
|
|
226
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/wallhack/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,CAAC,QAAQ;AAClD,mFAAmF;AACnF,MAAM,CAAC,MAAM,+BAA+B,GAAG,MAAM,CAAC,CAAC,OAAO;AAE9D,4DAA4D;AAC5D,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,GAAG,CAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAC5E,mEAAmE;AACnE,MAAM,CAAC,MAAM,6BAA6B,GAAG,IAAI,GAAG,CAAS,CAAC,MAAM,CAAC,CAAC,CAAC;AAEvE,8DAA8D;AAC9D,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,CAAC,QAAQ;AACzD,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC,CAAC,MAAM;AAChD,MAAM,CAAC,MAAM,4BAA4B,GAAG,MAAM,CAAC,CAAC,QAAQ;AAC5D,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAC;AAE5C,6EAA6E;AAC7E,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC;AACpC,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAEzC;;;GAGG;AACH,M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MAAM,GAAG,GAAG,QAAQ,CAAC,CAAC,CAAE,CAAC;IACzB,MAAM,OAAO,GAAG,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;IACpD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;AAClD,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export * from "../compx/codec.js";
|
|
2
|
+
export declare const WLMOUSE_VENDOR_ID = 13991;
|
|
3
|
+
export declare const WLMOUSE_POLLING_RATES: readonly [readonly [8, 125], readonly [4, 250], readonly [2, 500], readonly [1, 1000], readonly [16, 1000], readonly [32, 2000], readonly [64, 4000], readonly [128, 8000]];
|
|
4
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/wlmouse/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,eAAO,MAAM,iBAAiB,QAAS,CAAC;AACxC,eAAO,MAAM,qBAAqB,6KAGxB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from "../compx/codec.js";
|
|
2
|
+
export const WLMOUSE_VENDOR_ID = 0x36a7;
|
|
3
|
+
export const WLMOUSE_POLLING_RATES = [
|
|
4
|
+
[0x08, 125], [0x04, 250], [0x02, 500], [0x01, 1000],
|
|
5
|
+
[0x10, 1000], [0x20, 2000], [0x40, 4000], [0x80, 8000],
|
|
6
|
+
];
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/wlmouse/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,MAAM,CAAC,MAAM,iBAAiB,GAAG,MAAM,CAAC;AACxC,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;IACnD,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC;CAC9C,CAAC"}
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wooting analog keyboard vendor HID protocol — transport-independent codec.
|
|
3
|
+
*
|
|
4
|
+
* Wire mechanics mirror the official Wooting RGB SDK (`src/wooting-usb.c`,
|
|
5
|
+
* `wooting_usb_send_feature_buff`). Commands are 8-byte HID *feature* reports:
|
|
6
|
+
*
|
|
7
|
+
* [reportIndex, magic0, magic1, commandId, param3, param2, param1, param0]
|
|
8
|
+
*
|
|
9
|
+
* where `magic0`/`magic1` are `0xD0`/`0xDA` on single-report (v1/v2-interface)
|
|
10
|
+
* devices and `0xD1`/`0xDA` on multi-report (v3) devices, and `reportIndex`
|
|
11
|
+
* (0 or 1) matches. Note the SDK writes the four parameters in reverse order
|
|
12
|
+
* (param3 first). The response is read back as an *input* report; its layout is
|
|
13
|
+
* command-specific.
|
|
14
|
+
*
|
|
15
|
+
* The Wooting 60HE+ (VID `0x31E3`, PID `0x1322`) is a single-report,
|
|
16
|
+
* v2-interface board, so it uses magic `0xD0`/`0xDA` and report index 0, and
|
|
17
|
+
* exposes its config interface on vendor usage page `0xFF53`, usage `0x01`.
|
|
18
|
+
*
|
|
19
|
+
* These helpers are read-only building blocks: OpenMouse uses them to identify
|
|
20
|
+
* a board and, where the browser permits, read its device config. No firmware
|
|
21
|
+
* flashing, profile writes, or key remapping live here.
|
|
22
|
+
*/
|
|
23
|
+
/** Wooting "VID2" — used by every Hall-effect / ARM board (Two HE, 60HE, 60HE+, 80HE…). */
|
|
24
|
+
export declare const WOOTING_VENDOR_ID = 12771;
|
|
25
|
+
/** Atmel VID on the original AVR boards (Wooting One / Two). Kept for discovery only. */
|
|
26
|
+
export declare const WOOTING_LEGACY_VENDOR_ID = 1003;
|
|
27
|
+
/**
|
|
28
|
+
* Vendor config interface exposed over WebHID. The 60HE+ presents several
|
|
29
|
+
* vendor-defined collections; only `0xFF55` usage `0x01` declares a writable
|
|
30
|
+
* feature report (confirmed on hardware — the `0xFF53` collection is the
|
|
31
|
+
* analog/HID data stream and declares no feature report, so a WebHID feature
|
|
32
|
+
* write there fails). `0xFF00` is the legacy generic interface on older boards.
|
|
33
|
+
*/
|
|
34
|
+
export declare const WOOTING_CONFIG_USAGE_PAGE = 65365;
|
|
35
|
+
export declare const WOOTING_CONFIG_USAGE_PAGE_LEGACY = 65280;
|
|
36
|
+
/** The analog/HID data stream — not used for commands. */
|
|
37
|
+
export declare const WOOTING_ANALOG_USAGE_PAGE = 65363;
|
|
38
|
+
export declare const WOOTING_CONFIG_USAGE = 1;
|
|
39
|
+
export interface WootingProduct {
|
|
40
|
+
name: string;
|
|
41
|
+
/** True only once the board has been exercised on real hardware through OpenMouse. */
|
|
42
|
+
verified: boolean;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Known product IDs. Only the 60HE+ is listed until other boards are captured
|
|
46
|
+
* with `openmouse-collect` and confirmed on hardware.
|
|
47
|
+
*/
|
|
48
|
+
export declare const WOOTING_PRODUCTS: ReadonlyMap<number, WootingProduct>;
|
|
49
|
+
export declare const WOOTING_PRODUCT_IDS: readonly number[];
|
|
50
|
+
export declare const WOOTING_COMMAND_SIZE = 8;
|
|
51
|
+
export declare const WOOTING_MAGIC_SINGLE = 208;
|
|
52
|
+
export declare const WOOTING_MAGIC_MULTI = 209;
|
|
53
|
+
export declare const WOOTING_MAGIC_WORD_1 = 218;
|
|
54
|
+
/**
|
|
55
|
+
* Command IDs from the D0DA command table (the `d0da` project's
|
|
56
|
+
* `d0da_feature.py`, cross-checked with the RGB SDK). Only read-only queries are
|
|
57
|
+
* listed here — deliberately NOT the neighbouring destructive ones
|
|
58
|
+
* (`reset_to_bootloader = 0x02`, `keys_off = 0x15`, `do_soft_reset = 0x19`).
|
|
59
|
+
*/
|
|
60
|
+
export declare const WOOTING_COMMAND: {
|
|
61
|
+
/** get_version — firmware version. */
|
|
62
|
+
readonly getVersion: 1;
|
|
63
|
+
/** get_serial — device serial number. */
|
|
64
|
+
readonly getSerial: 3;
|
|
65
|
+
/** get_current_keyboard_profile_index — which onboard profile is active. */
|
|
66
|
+
readonly getCurrentKeyboardProfileIndex: 11;
|
|
67
|
+
/** get_actuation_profile — per-key actuation overrides for a profile. */
|
|
68
|
+
readonly getActuationProfile: 49;
|
|
69
|
+
/** get_keyboard_profile — the active profile: actuation (field 1, mm × 20480), rapid trigger, etc. */
|
|
70
|
+
readonly getKeyboardProfile: 39;
|
|
71
|
+
/** get_settings — global device settings protobuf. */
|
|
72
|
+
readonly getSettings: 51;
|
|
73
|
+
/** get_device_config — board layout / config block. */
|
|
74
|
+
readonly getDeviceConfig: 19;
|
|
75
|
+
};
|
|
76
|
+
/** Total key travel of a Wooting Lekker/analog switch, in millimetres (0–255 maps onto this). */
|
|
77
|
+
export declare const WOOTING_TRAVEL_MM = 4;
|
|
78
|
+
/** Convert a raw 0–255 analog value to millimetres of travel. */
|
|
79
|
+
export declare function wootingAnalogMm(value: number): number;
|
|
80
|
+
/** One decoded protobuf field: its number, wire type, and value(s). */
|
|
81
|
+
export interface ProtobufField {
|
|
82
|
+
field: number;
|
|
83
|
+
wire: number;
|
|
84
|
+
/** varint / 32-bit / 64-bit numeric value (wire 0/5/1). */
|
|
85
|
+
int?: number;
|
|
86
|
+
/** the same 32-/64-bit value read as a float, for spotting mm settings. */
|
|
87
|
+
float?: number;
|
|
88
|
+
/** length-delimited payload (wire 2) — sub-message or string/bytes. */
|
|
89
|
+
bytes?: Uint8Array;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Decode a protobuf message into its raw fields — no schema needed, because the
|
|
93
|
+
* wire format tags every field with its number and type. Used to read the
|
|
94
|
+
* Wooting profile blob and pick out the actuation / rapid-trigger values by
|
|
95
|
+
* correlating with known settings. Returns [] if the bytes are not valid protobuf.
|
|
96
|
+
*/
|
|
97
|
+
export declare function decodeProtobufFields(data: Uint8Array): ProtobufField[];
|
|
98
|
+
/** Decoded actuation / rapid-trigger settings for the active profile. */
|
|
99
|
+
export interface WootingActuation {
|
|
100
|
+
/** Actuation point in millimetres (the depth at which a press registers). */
|
|
101
|
+
actuationMm: number;
|
|
102
|
+
/** Whether rapid trigger is enabled. */
|
|
103
|
+
rapidTrigger: boolean;
|
|
104
|
+
/** Rapid-trigger sensitivity in millimetres, when rapid trigger is on. */
|
|
105
|
+
rapidTriggerSensitivityMm: number | null;
|
|
106
|
+
/** Continuous rapid trigger (release only when the key fully lifts). */
|
|
107
|
+
continuousRapidTrigger: boolean;
|
|
108
|
+
}
|
|
109
|
+
/** Raw global settings decoded from a get_settings (0x33) reply. */
|
|
110
|
+
export interface WootingGlobalSettings {
|
|
111
|
+
/** Raw actuation value (nested field 1). Multiply by the mm factor to display. */
|
|
112
|
+
actuationRaw: number | null;
|
|
113
|
+
/** Raw rapid-trigger sensitivity value (nested field 2). */
|
|
114
|
+
rapidTriggerSensitivityRaw: number | null;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Decode the global settings from a `get_settings` (0x33) reply, confirmed on a
|
|
118
|
+
* real 60HE+: `d1 da 33 88 <len:u16> <protobuf>`. The body's field 1 is a nested
|
|
119
|
+
* message whose field 1 is the global actuation and field 2 the rapid-trigger
|
|
120
|
+
* sensitivity (raw units). Example `08 05 10 0a` → actuation 5, RT sensitivity 10
|
|
121
|
+
* for a keyboard set to 0.20mm / 0.15mm.
|
|
122
|
+
*/
|
|
123
|
+
/**
|
|
124
|
+
* Decode the nested-message fields of a profile reply
|
|
125
|
+
* (`magic magic cmd status <len:u16> 0a <len> <nested>`). Returns the nested
|
|
126
|
+
* message's fields as {field, value}. Used to read the keyboard profile (0x27),
|
|
127
|
+
* whose field 1 is the actuation (stored as mm × 20480).
|
|
128
|
+
*/
|
|
129
|
+
export declare function decodeWootingProfileFields(reply: Uint8Array): Array<{
|
|
130
|
+
field: number;
|
|
131
|
+
value: number;
|
|
132
|
+
}>;
|
|
133
|
+
/**
|
|
134
|
+
* Millimetres of actuation from the keyboard profile's raw value. Confirmed on a
|
|
135
|
+
* 60HE+ across two settings: 1.00mm → 20480, 0.50mm → 18432, i.e. a line
|
|
136
|
+
* `raw = 16384 + mm * 4096` (raw 0x4000 = 0mm, 0x8000 = 4mm).
|
|
137
|
+
*/
|
|
138
|
+
export declare const WOOTING_ACTUATION_ZERO = 16384;
|
|
139
|
+
export declare const WOOTING_ACTUATION_UNITS_PER_MM = 4096;
|
|
140
|
+
export declare function wootingActuationMm(raw: number): number;
|
|
141
|
+
export declare function decodeWootingGlobalSettings(reply: Uint8Array): WootingGlobalSettings | null;
|
|
142
|
+
export interface WootingCommandOptions {
|
|
143
|
+
/** Multi-report (v3) boards use magic 0xD1 and report index 1. The 60HE+ does not. */
|
|
144
|
+
multiReport?: boolean;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Build the full 8-byte command buffer exactly as the SDK lays it out, with the
|
|
148
|
+
* hidapi report-index byte first. Transports that take the report id separately
|
|
149
|
+
* (WebHID) should send `buffer[0]` as the report id and `buffer.subarray(1)` as
|
|
150
|
+
* the data — see {@link wootingFeatureReport}.
|
|
151
|
+
*/
|
|
152
|
+
export declare function encodeWootingCommand(commandId: number, param0?: number, param1?: number, param2?: number, param3?: number, { multiReport }?: WootingCommandOptions): Uint8Array;
|
|
153
|
+
/**
|
|
154
|
+
* Split an encoded command into the `{ reportId, data }` pair a WebHID
|
|
155
|
+
* `sendFeatureReport(reportId, data)` call expects: the leading hidapi index
|
|
156
|
+
* byte becomes the report id, and the remaining seven bytes are the data.
|
|
157
|
+
*/
|
|
158
|
+
export declare function wootingFeatureReport(buffer: Uint8Array): {
|
|
159
|
+
reportId: number;
|
|
160
|
+
data: Uint8Array<ArrayBuffer>;
|
|
161
|
+
};
|
|
162
|
+
/**
|
|
163
|
+
* Board physical layout as reported in the device-config response. Values follow
|
|
164
|
+
* the SDK's `WOOTING_DEVICE_LAYOUT` enum (wooting-usb.h); anything outside it is
|
|
165
|
+
* surfaced as `Unknown` with the raw id kept.
|
|
166
|
+
*/
|
|
167
|
+
export type WootingLayout = "ANSI" | "ISO" | "JIS" | "ANSI Split" | "ISO Split" | "Unknown";
|
|
168
|
+
export interface WootingDeviceConfig {
|
|
169
|
+
layout: WootingLayout;
|
|
170
|
+
/** Raw layout byte, preserved for boards whose value we do not name yet. */
|
|
171
|
+
layoutId: number;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Offset of the layout byte inside the device-config response as WebHID delivers
|
|
175
|
+
* it. The Wooting SDK reads index 10, but its buffer includes the leading
|
|
176
|
+
* report-id byte that a WebHID `inputreport` event strips, so the same field
|
|
177
|
+
* sits at index 9 here — confirmed against a 60HE+ reply
|
|
178
|
+
* (`d1 da 13 88 07 00 00 00 00 00 …`, byte 9 = 0x00 = ANSI).
|
|
179
|
+
*/
|
|
180
|
+
export declare const WOOTING_DEVICE_CONFIG_LAYOUT_OFFSET = 9;
|
|
181
|
+
/**
|
|
182
|
+
* Decode the layout out of a device-config response. `response` is the raw input
|
|
183
|
+
* report payload (no report-id prefix, matching the WebHID `inputreport` event).
|
|
184
|
+
* Returns `null` when the buffer is too short to trust.
|
|
185
|
+
*/
|
|
186
|
+
export declare function decodeWootingDeviceConfig(response: Uint8Array, offset?: number): WootingDeviceConfig | null;
|
|
187
|
+
/**
|
|
188
|
+
* True when a buffer looks like a genuine Wooting command reply: it starts with
|
|
189
|
+
* the magic word (`0xD0` or `0xD1`, then `0xDA`) and is long enough to carry a
|
|
190
|
+
* command byte. Used to reject stub responses — e.g. a feature GET that echoes
|
|
191
|
+
* only the report id — so the driver waits for the real input-report reply.
|
|
192
|
+
*/
|
|
193
|
+
export declare function isWootingReply(bytes: Uint8Array): boolean;
|
|
194
|
+
/** Offset of the `major` byte in a get_version reply (minor/patch follow). */
|
|
195
|
+
export declare const WOOTING_VERSION_OFFSET = 6;
|
|
196
|
+
/**
|
|
197
|
+
* Decode the firmware version out of a `get_version` reply.
|
|
198
|
+
*
|
|
199
|
+
* Confirmed against a real 60HE+ answer `d1 da 01 88 03 00 02 0d 00 …` whose
|
|
200
|
+
* Wootility-reported version is v2.13.0: after the 4-byte header
|
|
201
|
+
* (`magic0 magic1 command status`, status 0x88 = OK) and a two-byte leading
|
|
202
|
+
* field, the version is `major minor patch` at offset 6 — here 2, 13, 0 → "2.13.0".
|
|
203
|
+
* Returns null when the reply is not a version answer or carries no version.
|
|
204
|
+
*/
|
|
205
|
+
export declare function decodeWootingVersion(reply: Uint8Array): string | null;
|
|
206
|
+
/** One key's live analog reading: a USB HID keyboard usage id and its 0–255 travel. */
|
|
207
|
+
export interface WootingAnalogKey {
|
|
208
|
+
/** USB HID keyboard/keypad usage id (e.g. 0x04 = A). */
|
|
209
|
+
usage: number;
|
|
210
|
+
/** Analog value, 0 (released) to 255 (fully pressed). */
|
|
211
|
+
value: number;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Decode one analog input report from the Wooting analog stream (the 0xFF53
|
|
215
|
+
* interface). The report is a run of 3-byte entries `[usageHigh, usage, value]`;
|
|
216
|
+
* a full snapshot of the currently-pressed keys arrives on every event (a key at
|
|
217
|
+
* value 0 / usage 0 is absent). Layout matches the community WebHID readers
|
|
218
|
+
* (colecrouter/wooting-js). Returns the pressed keys in a stable order (by usage
|
|
219
|
+
* id) so a live UI can keep each key's row in place instead of reordering as
|
|
220
|
+
* values fluctuate.
|
|
221
|
+
*/
|
|
222
|
+
export declare function decodeWootingAnalogReport(data: Uint8Array): WootingAnalogKey[];
|
|
223
|
+
/** Human name for a product id, falling back to a generic Wooting label. */
|
|
224
|
+
export declare function wootingProductName(productId: number): string;
|
|
225
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/wooting/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,2FAA2F;AAC3F,eAAO,MAAM,iBAAiB,QAAS,CAAC;AACxC,yFAAyF;AACzF,eAAO,MAAM,wBAAwB,OAAS,CAAC;AAE/C;;;;;;GAMG;AACH,eAAO,MAAM,yBAAyB,QAAS,CAAC;AAChD,eAAO,MAAM,gCAAgC,QAAS,CAAC;AACvD,0DAA0D;AAC1D,eAAO,MAAM,yBAAyB,QAAS,CAAC;AAChD,eAAO,MAAM,oBAAoB,IAAO,CAAC;AAEzC,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,sFAAsF;IACtF,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,MAAM,EAAE,cAAc,CAE/D,CAAC;AAEH,eAAO,MAAM,mBAAmB,EAAE,SAAS,MAAM,EAAiC,CAAC;AAEnF,eAAO,MAAM,oBAAoB,IAAI,CAAC;AACtC,eAAO,MAAM,oBAAoB,MAAO,CAAC;AACzC,eAAO,MAAM,mBAAmB,MAAO,CAAC;AACxC,eAAO,MAAM,oBAAoB,MAAO,CAAC;AAEzC;;;;;GAKG;AACH,eAAO,MAAM,eAAe;IAC1B,sCAAsC;;IAEtC,yCAAyC;;IAEzC,4EAA4E;;IAE5E,yEAAyE;;IAEzE,sGAAsG;;IAEtG,sDAAsD;;IAEtD,uDAAuD;;CAE/C,CAAC;AAEX,iGAAiG;AACjG,eAAO,MAAM,iBAAiB,IAAM,CAAC;AAErC,iEAAiE;AACjE,wBAAgB,eAAe,CAAC,KAAK,EAAE,M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