首页 > 解决方案 > 在 Node.js 中监听全局按键

问题描述

我正在尝试收听全局按键,并检查了与我的类似的其他堆栈溢出问题。我使用了iohook,但出现了错误。

refresh_locale_list [476]: GetKeyboardLayoutList(0, NULL) found 1 layouts.
refresh_locale_list [493]: Received 1 locales.
load_input_helper [866]: refresh_locale_list() found 1 locale(s).

我怎么解决这个问题?还有其他解决方案吗?

(我只是将它用于一个简单的节点应用程序)

节点版本:v14.15.0

标签: node.jskeypress

解决方案


Windows 上的 node v > 13.x 可能存在错误

尝试节点版本之一<= 13.x


推荐阅读