c chetan patel 11 months 3 weeks ago
92
0
Hello Team
I am a cordova application developer.
I have purchased a Zebra TC27 PDA for my cordova application for 2D scanner functionality.
I used it in my app for keydown events using EventListener
please see below example.
document.addEventListener("keydown", onButtonPress, false);
function onButtonPress(e) {
alert("key : " + e.key + "\ncode : " + e.code);
}
Problem is
I pressed button only once then the event is running infinite time (not every time facing issue)
should be event call only one time
Please suggest or a demo/ example if possible.
1 Replies
This issue could be related to the device's keyboard behavior or the way events are being handled in your Cordova application. Instead of relying on e.key or e.code, you might want to use e.keyCode to identify the specific key being pressed. Some devices may have variations in how they report key spacebar clicker events.