简体   繁体   English

条形码扫描仪轮询

[英]barcode scanner polling

I am working with a bar code scanner and java currently.我目前正在使用条形码扫描仪和 java。 i wanted to know wether there is a possibility to poll this device.我想知道是否有可能对该设备进行轮询。

What I want: a popup message every time you scan a barcode我想要的:每次扫描条形码时弹出消息

What I dont want: is to focus a text field first to do so.我不想要的是:首先关注文本字段。

I want this to run in the background so that the user only has to scan something without anything in focus.我希望它在后台运行,这样用户只需扫描一些没有聚焦的东西。 is this possible?这可能吗? in other words, i dont want to use it like a keyboard but more like a sensor that informs me every time a new value is available.换句话说,我不想像键盘一样使用它,而更像是一个传感器,每次有新值可用时都会通知我。

thank in advance预先感谢

i think these mostly work as keyboard input.我认为这些主要用作键盘输入。

you could probably create a KeyListener() to check for the incoming values.您可能可以创建一个 KeyListener() 来检查传入的值。

Yes you can listen barcode scanning detection on your whole hardware at anytime example:PC or Laptop or Tablet etc.是的,您可以随时在整个硬件上收听条形码扫描检测,例如:PC、笔记本电脑或平板电脑等。

For that you need to add barcode scanner listener on your main file which is available to all the pages or all the urls of your application.为此,您需要在主文件中添加条形码扫描器侦听器,该侦听器可用于应用程序的所有页面或所有 url。

You can use my custome script from my answer on stackoverflow您可以使用我在stackoverflow上的回答中的客户脚本

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM