浏览器JavaScript键盘楔形器从扫描仪/阅读器捕获

发布于 2025-02-06 18:01:00 字数 393 浏览 1 评论 0原文

我正在开发一个可以在其中使用的网页:(除了鼠标和键盘外)

  • 条形码扫描仪
  • 在客户端端都可以使用RFID读取器

,并且可以用作键盘楔子,以键入代码 + ENTER键入

我可能会配置start/ inter/ in条形码扫描仪的停止字符,但是AFAIK没有实用程序可以为RFID读取器配置相同的功能。

捕获每个设备并将其与用户输入区分开的最佳方法是什么?

我尝试安装Winusb驱动程序(使用Zadig),即使我可以打开我迷路的设备,从而获得了适当的设置,以从扫描仪/读取器接收代码。

如果是将USB设备转换为串行的通用驱动程序,我可以在我的代码中使用Navigator.Serial。我还找不到一个方向的任何指针。

提前致谢 亚历克斯

I'm developing a web page in which the user can use: (in addition to mouse and keyboard)

  • a barcode scanner
  • an RFID reader

Both of them at client side and work as keyboard wedges that type the code + ENTER

I may configure start/stop chars for the barcode scanner but AFAIK don't have an utility to configure the same for the RFID reader.

What is the best method to capture the individual codes for each device and distinguish them from user input?

I tried installing winusb driver (using zadig) and even though I can open the device I'm at lost with getting the proper setup for receiving the codes from the scanner/reader.

If the were an universal driver to convert an usb device to serial I could use navigator.serial in my code. I couldn't find one yet, any pointers in this direction also welcome.

Thanks in advance
Alex

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文