Hide pop-up keypad

I am using the build-in barcode scanner Android device for data collection application. When the Input field get focus(), the keypad will pop-up. Is there any way to hide the pop-up keypad after scanning the barcode as input, since I don’t need the keypad to key-in the content. But when I touch the Input field on screen, I want the keypad come out for manual input.

You can try two things: the focus and blur events OR ionic has a keyboard plugin with keyboard.hide()/.show() functions.

I’m tested with the focus & blur events, but they all not working. I am thinking an easy way to solve it out. When the textbox get focus, the keyboard pop-up, I can click the physical “Back” button to dismiss the soft keyboard. Is there any command or function to perform as clicking the physical “Back” button within the program?

This is a long running problem on all platforms and there are two solutions: 1) there is a keyboard plugin that allows you to show/hide the keyboard program programmatically; 2) if you have a help icon (?) that pops up some help text, you can set the focus on that (setting the focus won’t open the help).

I have 3 textboxes need to be scan the barcodes with the Android based mobile computer with build-in barcode scanner. After one textbox is input by the barcode scanner, I need to focus() onto the next textbox for the next barcode input, but the pop-up keypad will come out. I try to use the “cordova-plugin-keyboard” to keyboard.hide() the keyboard, but it is not working.

What happens if you set the text fields to readonly?

What device are you using?

Honeywell ScanPal EDA50 Mobile Computer

I found a number of hits when I googled this:

android bar code honeywell hide keyboard

You’re not the only one to have this question.

It work with the TextBox.readOnly now

Hello Michael,
I have the same problem and haven’t found a solution yet.
But when I set a TextBox.readOnly, I don’t get a string from the scanner either. What trick did you use?
I also tried intercepting the keycodes.
But apart from VBCR (13), I only get key 229 (from memory) and no normal ASCII codes.

Hi Paparazzi,

I use the SetTimeout(Keyboard.hide,10) to hide the keypad. You need to specify the Plugin <plugin name="cordova-plugin-keyboard" source="npm" /> in the config.xml in the Properties of Voltbuilder.

Hello Michael,
Thank you for your feedback.
Unfortunately, I’ve never worked with the config.xml before and don’t know how to enter it.
I think something like this?

.preference name=“DisallowOverscroll” value=“true”/.
.preference name=“SetTimeout(Keyboard.hide,10)”/.
???

I would prefer to do this via Input1.
Alternatively, a Textarea1.

Don’t I also have to specify that the keyboard shouldn’t open ‘only there’?

Ore maybe give me a screenshot to afruehauf at web.de

Best regards

You can open the config.xml from the “Project Properties and Global Code” as follows:

Then add the line “cordova-plugin-keyboard” as follows:

Hello Michael,
Thank you very much and sorry.
I don’t know what to do.

I searched the web and found “Plugin Search - Apache Cordova”. Still, I can’t find what to do with it.
I think I need to download and install something and then add it to the XML - but at the moment I can’t find a way and I have no idea.

Unfortunately, I’m coming from a very old corner of QuickBasic, VB6, and so on. I’m learning everything else somehow…

I’m very burned out at the moment and will be out of the office for a week. Maybe then I’ll be fresh and ready to go.

Until then, thank you very much - at least you’re giving me hope :wink:
Best regards

Enjoy your time off!

@Michael’s notes are correct and a good place to start. Keep us posted on how you’re coming along.

Hi Paparazzi,

The plugin is included in the Voltbuilder. If you build the apk with Voltbuilder, you don’t need to install the plugin. You just need to insert a line () to specify the plugin in the config.xml file in the “Project Properties and Global Code” → “Voltbuilder” (like the previous photo).

In the input_onfocus() event, you just need to use the command “SetTimeout(Keyboard.hide,10)” to hide the keypad when the input got focus. It work fine for me in the BS4 input control.

Hello Michael,
I’m not making an APK, but my application is running on my server. Everything’s working great now – except for the keyboard (and the missing printer connection).
Unfortunately, the entry “SetTimeout(Keyboard.hide,10)” has no effect for me.
Best regards from the Old Continent,
Paparazzi