Num-Keypad In Perspective

Is there an easy/best solution for a keypad in Perspective for a touchscreen?

What is the issue?

I find that numeric fields bring up a numpad on all touch devices I've seen. Windows must just be in tablet mode.

Whether TabletMode or Windows OSK I want to click an input field and have the keypad come up and in focus.

Have you looked at the resources on the Exchange?

Sample Result:
Advanced Perspective Keypad

1 Like

I tried the keypad from there but it gave me an error and I abandoned it. For now, I'm using a third-party virtual keyboard ("Touch-It Virtual Keyboard"). It works in Perspective Workstation and allows me to log in. I don't see a way to only show the numeric keypad when needed or a way to keep the user from accessing the browser but it'll do for now.

What errors did you get? I made the resource linked above and maybe can help you out. Did you try the example keypad that's shown? If it works, it should work with your project as well as long as you configure it properly.

1 Like

I’m trying to use the keypad from the ignition exchange, i followed the instructions and i could not get it to work either. I’m just looking for a simple number keypad in perspective using a windows computer but not using a actual keypad.

Did you get my email response? Do the examples work on your system? If so, compare what you have vs what the examples have as there’s a few things you have to set up to get it to work properly.

1 Like

Having used this resource before, it’s a very clean system once set up. If you don’t get to the bottom of the issues on email, post screenshots and code and we may be able to help.

I can get this to work as a single instance. But when i create a template with it, and use multiple instances of the template, even though i use different tags, they all change to the same value when i type a number in to the keypad. How do i use it in a template?

If you are using michael.flagler’s keypad, there is a field that is needed for tracking the owner of the popup:
ownerId - Used internally to track which field popup belongs to (this must exist)

This needs to be unique to each input element in order to work.

Yes I have tried making it unique but now it wont write the setpoint.

Below is what I have changed on the numeric input and on the keypad popup.

Did I miss something?

I’m guessing this keypad can not be used in a template because we can’t pass the owner ID.

It can, but I'll have to look at it again to explain how as I've been in the Vision world for a couple years and haven't been in Perspective in a while. I'll try to take a look again today to get the details on how to use it in a template.

i am using it in the perspective i created a view that i can use as a template.

Did you try to match the casing here?

OwnerID != ownerId

where should this be added?

I like using the keypad in the exchange others mentioned, but here’s a potential snag with perspective.

By calling the keypad up with an entry field, it will also trigger the operating system’s on-screen keyboard if that’s enabled. If you disable the OS’s OSK, that will solve that problem, but you won’t be able to use it for logging in. The login screen in Perspective is separate from the project, and you cannot use project resources in it. There’s no way you can call up a view from that screen to log in, so Perspective essentially forces you to use the OSK built into the OS, anyway. Unless you have no security whatsoever on your project and everything is just wide open and accessible, you will be using the OSOSK. Period.

The way to get around the “double keyboard” problem is making what launches the custom keypad in your project some object other than a text or numeric entry object. I like to use an icon personally. It takes some digging around with how it works to get it working, but it’s definitely possible. That way, you can keep the OS’s OSK enabled, but an event tied to an object that isn’t an actual keyboard entry object won’t trigger it, and you won’t get double keyboards.

That said, there’s honestly very little reason to do anything other than the OS pop-up keyboard that’s built in. The custom view on the exchange thing is nice because it shows you the acceptable range and the engineering units, but you can do that elsewhere on your view, maybe not as cleanly, but you can. The big disadvantage is that you’re dealing with a popup window which is not great if you’re using the app with mobile. The numeric keypad is usually fine, but the ASCII keyboard is too wide for a mobile phone and looks bad.

Bottom-line, trying to finagle this custom exchange keyboard into your project is a lot of effort for relatively little gain; and it causes more problems, especially with mobile responsiveness, than it solves. Most of the time, I just opt to use the OS’s keyboard and call it a day. It’s fine. It works. Could it be nicer? Sure. Is it ever necessary for it to be nicer besides “the customer doesn’t personally like it for personal artistic reasons”? No. Besides, any customer who complains about it…they use that same exact keyboard on their mobile devices every single day, so why is it all of the sudden a problem on their HMI?

3 Likes

I am also looking into this and was wondering if you could forward me that email? would be very curious to see how it works!

I’m trying to use the on screen keyboard now, in the perspective workstation but it does not appear when i click in a input field, i have to open the keyboard manually, how do we make it come up when you click on a input field?