npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

avke-sdk

v1.0.7

Published

AVKE - 爱客游戏外设开发者联盟 SDK

Readme

AVKE SDK

AVKE SDK is a JavaScript and TypeScript SDK for gaming peripherals. It is built on WebHID and provides keyboard and mouse APIs for device discovery, initialization, configuration, lighting, and performance features.

Version

Current package version: 1.0.7

What's New in 1.0.7

  • Fixed the npm package README publishing flow so the published README now uses src/lib/README.md as the single source of truth.
  • Cleaned up the package README structure for npm publishing and aligned package preparation with the npm-package directory workflow.

What's New in 1.0.6

  • Synced the DKS advanced-key API so the task parameter now uses the final 4-segment format only.
  • Renamed DKS debug-tool fields from bits to trps and documented the 7-bit trigger order.
  • Updated Chinese and English higherKey documentation with the trps bit mapping and refreshed website release content.

Install

npm install avke-sdk

Runtime Requirements

  • A modern browser with WebHID support.
  • A user gesture before requesting device access.
  • HTTPS or localhost during development and testing.

Main Exports

import ServiceKeyboard, {
  ServiceKeyboard,
  ServiceMouse,
  versionManager,
  logger,
  performanceMonitor
} from 'avke-sdk'
  • ServiceKeyboard: keyboard SDK service.
  • ServiceMouse: mouse SDK service.
  • versionManager: SDK version and compatibility helper.
  • logger: runtime logger.
  • performanceMonitor: operation and connection metrics helper.

Keyboard Quick Start

import { ServiceKeyboard } from 'avke-sdk'

const keyboard = new ServiceKeyboard()
const { code, devices } = await keyboard.getDevices()

if (code !== 0 || devices.length === 0) {
  throw new Error('No keyboard devices found')
}

await keyboard.init(devices[0].id)

const info = await keyboard.getDevicesInfo()
console.log(info)

Mouse Quick Start

import { ServiceMouse } from 'avke-sdk'

const mouse = new ServiceMouse()
const devices = await mouse.getDevices()

if (devices.length === 0) {
  throw new Error('No mouse devices found')
}

await mouse.init(devices[0].id)

const dpi = await mouse.getDPI()
console.log(dpi)

Examples

Read current keyboard config and polling rate

import { ServiceKeyboard } from 'avke-sdk'

const keyboard = new ServiceKeyboard()
const { code, devices } = await keyboard.getDevices()

if (code !== 0 || devices.length === 0) {
  throw new Error('No keyboard devices found')
}

const initResult = await keyboard.init(devices[0].id)

if (initResult.code !== 0) {
  throw new Error(initResult.info || 'Keyboard initialization failed')
}

const currentConfig = await keyboard.getConfig()
const pollingRate = await keyboard.getRateOfReturn()

console.log(currentConfig)
console.log(pollingRate)

Set keyboard backlight base config

await keyboard.setLightingBase({
  data: {
    mode: 2,
    childMode: 1,
    luminance: 3,
    speed: 4
  }
})

Read custom keyboard backlight with live reports

const handleReport = (payload) => {
  console.log('keyboardBacklightCustomReport', payload)
}

keyboard.on('keyboardBacklightCustomReport', handleReport)

const snapshot = await keyboard.getKeyboardBacklightCustom()
console.log(snapshot)

const heartbeatId = setInterval(() => {
  keyboard.getKeyboardBacklightCustom().catch(console.error)
}, 5000)

keyboard.off('keyboardBacklightCustomReport', handleReport)
clearInterval(heartbeatId)

Read and update mouse DPI

import { ServiceMouse } from 'avke-sdk'

const mouse = new ServiceMouse()
const devices = await mouse.getDevices()

if (devices.length === 0) {
  throw new Error('No mouse devices found')
}

await mouse.init(devices[0].id)

const currentDpi = await mouse.getDPI()
await mouse.setDPI(1600)

console.log(currentDpi)

TypeScript

Type declarations are bundled with the package.

Notes

  • ServiceKeyboard.getDevices() returns { code, devices }.
  • ServiceMouse.getDevices() returns a device array directly.
  • Keyboard custom backlight and logo custom lighting support real-time report events and heartbeat-based refresh.
  • The package README published to npm is generated from this file via npm run package:prepare.