ZK and Barcode Reader Device

asked 2011-11-16 01:45:05 +0800

aktejo gravatar image aktejo
155 3

Dear ZK Experts,

Anybody has idea about how to use barcode reader device to interact with zk application.
I want to display information read by barcode reader device in one of textbox in my ZK Application.

Thanks for help

delete flag offensive retag edit

4 Replies

Sort by ยป oldest newest

answered 2011-11-16 16:14:47 +0800

twiegand gravatar image twiegand
1807 3


We use both barcode and RFID readers extensively and haven't had to do anything special for ZK to support them.  The hardware device reads the barcode (assuming the symbology is one the device supports), parses it, and gives it back to the application as straight text.  The devices generally appear as an HID (Human Input Device) - like a keyboard - to the host.

One thing you might need to configure is whether or not the device appends anything to the scan (such as a tab or enter).  Otherwise, the user will have to scan the barcode, then physically navigate to the next field.

Hope that helps,


link publish delete flag offensive edit

answered 2011-11-16 23:51:01 +0800

aktejo gravatar image aktejo
155 3

Yeah,. thanks todd for the information, finally i understand about how the device work, just like keyboard, i just need to set focus to particular form before read information from the reader.

link publish delete flag offensive edit

answered 2011-11-22 10:31:02 +0800

crc83 gravatar image crc83

I know two types of barcode reader devices:
1. Passes readed sequence as "key press events" (or keyboard like)
2. RS-232 devices
For second type you may need a special program on a customer side, to converd RS-232 data to keycodes (I have one for windows and I can share it with you if you like)

According to this you must deal with barcode readers in the same way as with keyboard input

link publish delete flag offensive edit

answered 2011-12-02 20:13:34 +0800

UmbraNoctis gravatar image UmbraNoctis

I'm working on the same idea, I have to capture the keystrokes of a barcode scanner and then parse them;
I have configured the scanner to send an Insert before the reading so as to know when to begin reading, but i'm at a loss as to how I should get the readings and know when to stop.
I've tried setting the focus on a textbox, but the focus itself won't be gained until the listener stops executing thus becoming useless, I've also tried synchronization, and either I didn't do it right or I didn't get the idea.
right now my code is:

public void readCode(){
		Tab tab4 = (Tab)Path.getComponent(PATH_VENTANA + "tab4");
			Textbox aux = ((Textbox)Path.getComponent(PATH_VENTANA + "txtaux"));
			aux.addEventListener("onChanging", new waitListener());
			lastinput = new Date();
			Thread t = new Thread(new Runnable() {
				public void run()
						while(new Date().getTime()- lastinput.getTime()<2000){
			}, "Thread de espera");
				try {					
				} catch (InterruptedException e) {

which is executed when a the Insert key is presed...

Can someone point me in the right direction?

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools




Asked: 2011-11-16 01:45:05 +0800

Seen: 847 times

Last updated: Dec 26 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More