Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Posts: 128
Registered: ‎08-01-2008
My Device: Bold 9900, 9810, 9780, 9650 and so many others
My Carrier: T-Mobile

Is it possible : Replicating key press

[ Edited ]

Hi Everyone,

I want to know if this is possible?


I have a browser based app which I want to enable for scanning (bar code scanning). What I was thiking was for the user to place the cursor on a particular HTML input field. Then do the scan. The scanning software would then replicate button presses so that the field (HTML input field ) now contains the serial that was scanned.

Do any of your Java gurus think this is possbile?


Message Edited by araskin on 01-19-2009 08:06 PM
Posts: 17,017
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Is it possible : Replicating key press

you can add a menu item to the browser to execute your own code.
to simulate input you can use EventInjector. You could also put the scanned barcode into the Clipboard and rely on the user to paste it. Or run the corresponding menu item (which would be a bit of an advanced topic).
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Is it possible : Replicating key press

[ Edited ]

All scanners that I have worked with, come with BlackBerry software called a Wedge.  If you install this and connect the Scanner to the Wedge, it will just dump the scanned bar code into the currently focused Input Field.  You must authorize the Wedge for EventInjector events.


So, short answer - yes it can be done, with no requirement for you to do any coding.

Message Edited by peter_strange on 01-20-2009 01:29 PM