No Touch Screen Keyboard when using system.gui.inputBox

I’m developing a project for use on a touch screen HMI, so I have ‘Touch Screen Mode Enabled’ in my project properties. For input field components from the component palette this works great, however,

When using ‘system.gui.inputBox’ to retrieve a user input from within a script, the touch screen keyboard will not appear on screen. I know I could just use system.gui.showTouchScreenKeyboard or system.gui.showNumericKeypad to get a user input, however I really like the .inputBox function as it means I can have a piece of text to accompany the input field, and I don’t have to mess around making popups to contain input fields etc.
I’ve tested this a couple of times to make sure this is the case and I’m fairly sure this is a missing piece of functionality…

Is there any reason why this doesn’t work? Ideally the system.gui.inputBox function would have an optional argument for specifying whether or not the keyboard will appear. In a perfect world I’d be able to specify whether I wanted the keyboard or the keypad :smiley:

Has anyone else encountered/been inconvenienced by this?


Just to make sure, even you’ve configured your project as Touch Screen Project. Are you actually launching the project in Touch mode?

Yes, touch mode is definitely enabled. Tapping into other input components in the project will bring up the keyboard, however the input field in the input box will not.

any logs in the console when attempting this action?

Unfortunately there is no output to the console or the gateway logs

Oh ok, I had to the testing to realize what’s wrong. Basically the input box is modal I will not allow to show a touch keyboard. BUT, let me see if I can handle it somehow…

I’d call support for this so they can file a bug if necessary. This function ends up calling out to Java to show a dialog, which I think in turn uses something native to the OS, and either way it seems touch may not be getting enabled on these.

1 Like

The system.gui functions that open dialogs are ‘modal’ - they halt all event handling on Swing’s main thread and block as long as the input box is open.
The touchscreen keyboard is also a modal dialog - you can’t have one open while the other is up.
That’s not to say there might not be some way for us to make things work, and it’s a valid request - just that that’s why it doesn’t currently work.



Just don’t use system.gui.*Box() methods at all. Like, never.

They stop the gui thread in addition to being modal. Use actual popup windows instead.