fix: 修改扫码枪监听

This commit is contained in:
weihongyang 2022-06-21 09:44:15 +08:00
джерело 37a7f6ae13
коміт 266ce0c6a7

@ -48,14 +48,17 @@ public class GlobalKeyListenerExample implements NativeKeyListener {
return NativeKeyEvent.getKeyText(n);
}).collect(Collectors.toList());
for (String s : collect) {
result = result + s;
}
if (queue.size() == 5) {
log.info("符合标准的扫码是:"+ result.replace("Enter",""));
for (String s : collect) {
result = result + s;
}
}else {
log.info("符合标准的扫码是:"+ result.substring(1).replace("Enter",""));
for (int i = 1; i < collect.size(); i++) {
result = result + collect.get(i);
}
}
log.info("符合标准的扫码是:"+ result.replace("Enter",""));
queue.clear();
}
if (queue.size() == 6){