Set focus on inputfield but hide keyboard in Android


I want to set focus on an inputfield, so when I scan a barcode the inputfield will be filled with the code. 

When I do that the keyboard is shown. How can I prevent this?


Hi Rosanne,

You can find a solution to your problem here:

It looks like if you use blur() on the focus of your input, that should do that trick.

Let me know if you have any issues,


Hi Justin, 

Thank you for your input.

unfortunately, that doesn't work. When I scan, no value will be inserted in the input, because of the blur.

I attached an example.


Hi Rosanne,

What kind of device are you using? You don't have a scanner plugin on your test.oml.

When your device has an integrated scanner which acts just like a physical keyboard, you can check out this page:

If you have a scanner plugin, assign the output of the scanner into the variable assigned to the textfield instead of assigning it to the textfield itself.

kind regards,

Remco Dekkinga