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

@rubick-extra/io-tools

v0.0.2

Published

io-tools是rubick-extra提供的工具插件,主要用于处理io监听及触发

Readme

@rubick-extra/io-tools

项目简介

io-toolsrubick-extra 提供的系统级插件,主要用于监听和处理计算机输入输出设备事件(如键盘、鼠标操作),并通过 Electron 的进程通信机制实现事件的跨进程传递。该插件支持快捷键记录、组合键验证、鼠标事件识别等功能,适用于需要监听用户输入行为的 Electron 应用场景。

功能特点

  • 多设备事件监听:支持键盘按下 / 抬起、鼠标按下 / 抬起等事件的实时捕获

  • 跨进程事件传递:通过 Electron 的 ipcMainipcRenderer 实现主进程与渲染进程的事件通信

  • 快捷键智能记录:自动识别有效快捷键组合,支持修饰键(Ctrl/Alt)组合、鼠标按键组合等

  • 上下文管理:动态管理多个渲染进程上下文的事件订阅与取消订阅

  • 事件格式化:将原始设备事件转换为可读的快捷键格式,支持鼠标长按 / 短按识别

事件处理流程

  1. 主进程通过 uiohook 监听设备事件

  2. 事件触发时通过 ipcMain 广播到所有订阅的主进程及渲染进程

  3. 渲染进程通过 useIOEvents 接收事件并分发给处理器

  4. ShortcutRecorder 处理事件流,识别有效快捷键组合

  5. 格式化后的快捷键状态通过回调函数通知应用层

许可证

该项目遵循 MIT 许可证,详情见 LICENSE 文件。