# Num-Keypad In Perspective

**URL:** <https://forum.inductiveautomation.com/t/num-keypad-in-perspective/76435>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [July 16, 2023, 5:21pm UTC](https://forum.inductiveautomation.com/t/num-keypad-in-perspective/76435 "2023-07-16T17:21:29Z")\
**Posts on this page:** 15\
**Page:** 2

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [August 26, 2025, 1:25pm UTC](https://forum.inductiveautomation.com/t/num-keypad-in-perspective/76435/21 "2025-08-26T13:25:16Z")

</div>

The times I used a custom OSK I did like what @Brian_Stilson said with minor variation.

My template would have a numeric display that shows the current value and a “hitbox” which is just a button on top of the numeric display that has opacity set to 0. So basically you hit the button when you click on the numeric display. This means the base container for the template is coordinate so you can make the hitbox overlap the display layer of your template but you can make the display layer a flex container with height and width of 100% to make your template follow a flex layout.

A button with an opacity of 0 is clickable but invisible. It’s good to use a button because some touchscreen drivers will have unreliable response to click events but onActionPerformed will work (at least has so far for me).

---

<div class="post-metadata">

**Author:** ![pprickett](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@pprickett](https://forum.inductiveautomation.com/u/pprickett)\
**Post date:** [August 26, 2025, 1:49pm UTC](https://forum.inductiveautomation.com/t/num-keypad-in-perspective/76435/22 "2025-08-26T13:49:11Z")

</div>

i added a button on m screen and what action should i select

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/e/5ed14edb7f1404a8e562f70d84b15b30bb5ec4a5.png)

---

<div class="post-metadata">

**Author:** ![Brian\_Stilson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/brian_stilson/32/73410_2.png) [@Brian\_Stilson](https://forum.inductiveautomation.com/u/Brian_Stilson)\
**Post date:** [August 26, 2025, 2:02pm UTC](https://forum.inductiveautomation.com/t/num-keypad-in-perspective/76435/23 "2025-08-26T14:02:18Z")

</div>

You can script an event on the label itself. You don’t need a button.

---

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [August 26, 2025, 2:03pm UTC](https://forum.inductiveautomation.com/t/num-keypad-in-perspective/76435/24 "2025-08-26T14:03:16Z")

</div>

I would use “Script” for this type of thing typically.

One possible exception…

If you can get all the stuff you need to load the template it can sometimes make sense to use “Popup” because it affords you some advanced features such as relative positioning which is sometimes desirable with popups. Viewport bound is also a nice feature to consider with popups.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/4/0/406ca2496431d9de2066470bf77e387f5485e41c.png)

---

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [August 26, 2025, 2:07pm UTC](https://forum.inductiveautomation.com/t/num-keypad-in-perspective/76435/25 "2025-08-26T14:07:05Z")

</div>

That’s true but a label doesn’t have the “onActionPerformed” event. I have seen some touchscreen drivers not reliably respond to normal mouse events but the “onActionPerformed” event has worked for me with all touchscreen drivers I have encountered so far out of the box without any fancy configuration. That’s why I recommend using an invisible button as a hitbox.

I think it was the Hope touchscreen driver that was not always getting the event unless I fiddled with emulation modes and whatnot. I’d rather have an invisible button in my setup than have a requirement to adjust the touchscreen configuration down the road as HMI clients are replaced.

---

<div class="post-metadata">

**Author:** ![pprickett](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@pprickett](https://forum.inductiveautomation.com/u/pprickett)\
**Post date:** [August 26, 2025, 2:23pm UTC](https://forum.inductiveautomation.com/t/num-keypad-in-perspective/76435/26 "2025-08-26T14:23:17Z")

</div>

all i’m looking for is a popup keypad that i can use with a mouse. is this something that perspective can not do. I have used the onscreen keyboard with no issue in the vision module by enabling it in the options in the designer.

I have used many SCADA packages that do this function with out any issue.

---

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [August 26, 2025, 2:29pm UTC](https://forum.inductiveautomation.com/t/num-keypad-in-perspective/76435/27 "2025-08-26T14:29:49Z")

</div>

Sure. You could use a script or popup command on an onClick or onActionPerformed event if you have a mouse.

The stuff I said about not using onClick only applies to some touchscreen drivers I have encountered.

---

<div class="post-metadata">

**Author:** ![pprickett](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@pprickett](https://forum.inductiveautomation.com/u/pprickett)\
**Post date:** [August 26, 2025, 2:39pm UTC](https://forum.inductiveautomation.com/t/num-keypad-in-perspective/76435/28 "2025-08-26T14:39:50Z")

</div>

i tried the onclick but i dont get the keyboard to popup. what am i missing?

---

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [August 26, 2025, 3:04pm UTC](https://forum.inductiveautomation.com/t/num-keypad-in-perspective/76435/29 "2025-08-26T15:04:41Z")

</div>

Have it write to a log on click to make sure you’re getting your event.

> **[system.util.getLogger | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-util/system-util-getLogger)**
>
> Returns a Logger object that can be used to log messages to the console.

---

<div class="post-metadata">

**Author:** ![pprickett](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@pprickett](https://forum.inductiveautomation.com/u/pprickett)\
**Post date:** [August 26, 2025, 5:04pm UTC](https://forum.inductiveautomation.com/t/num-keypad-in-perspective/76435/30 "2025-08-26T17:04:02Z")

</div>

is there anyone that can remote into my system to fix this issue?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [August 26, 2025, 5:10pm UTC](https://forum.inductiveautomation.com/t/num-keypad-in-perspective/76435/31 "2025-08-26T17:10:24Z")

</div>

Not here, give support a call if you're looking for help like that.

---

<div class="post-metadata">

**Author:** ![pprickett](https://avatars.discourse-cdn.com/v4/letter/p/ecae2f/32.png) [@pprickett](https://forum.inductiveautomation.com/u/pprickett)\
**Post date:** [August 26, 2025, 5:13pm UTC](https://forum.inductiveautomation.com/t/num-keypad-in-perspective/76435/32 "2025-08-26T17:13:03Z")

</div>

i cant believe something so simple is so difficult to do.

---

<div class="post-metadata">

**Author:** ![michael.flagler](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/michael.flagler/32/26272_2.png) [@michael.flagler](https://forum.inductiveautomation.com/u/michael.flagler)\
**Post date:** [August 26, 2025, 6:39pm UTC](https://forum.inductiveautomation.com/t/num-keypad-in-perspective/76435/33 "2025-08-26T18:39:44Z")

</div>

Sorry, I’ve been swamped, but if you’re using my numeric input touchscreen keypad resource from the Exchange, make sure your onMouseDown event on the numeric entry field component has this logic in it to properly set the `ownerId`

```python
def runAction(self, event):
    self.custom.keypad.ownerId = str(system.date.toMillis(system.date.now()))
    owner = self.custom.keypad.ownerId
    popParams = {'owner': owner, 'min': self.props.inputBounds.minimum, 'max': self.props.inputBounds.maximum, 'oldValue': self.props.value, 'units': self.custom.keypad.units, 'decimals': self.custom.keypad.decimals}
    posit = None if self.custom.keypad.centerScreen else {'left': event.clientX, 'top': event.clientY}
    system.perspective.openPopup('keypadPopup-' + owner, 'Exchange/Keypad/Numeric Popup', title=self.custom.keypad.title, params=popParams, position=posit, showCloseIcon=True, draggable=True, resizable=True, viewportBound=True, modal=True, overlayDismiss=True)

```

Then make sure in your scripts on that component, you have the `keypadReturn` message handler using this:

```python
def onMessageReceived(self, payload):
	if self.custom.keypad.ownerId == payload['owner']:
		self.props.value = float(payload['value'])

```

---

<div class="post-metadata">

**Author:** ![mandar\_ganoo](https://avatars.discourse-cdn.com/v4/letter/m/c2a13f/32.png) [@mandar\_ganoo](https://forum.inductiveautomation.com/u/mandar_ganoo)\
**Post date:** [November 27, 2025, 8:47am UTC](https://forum.inductiveautomation.com/t/num-keypad-in-perspective/76435/34 "2025-11-27T08:47:47Z")

</div>

Not sure why Ignition is not providing the in-build numeric keypad for alphanumeric entry?

---

<div class="post-metadata">

**Author:** ![andrew.budaiev](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/andrew.budaiev/32/72921_2.png) [@andrew.budaiev](https://forum.inductiveautomation.com/u/andrew.budaiev)\
**Post date:** [November 27, 2025, 9:55pm UTC](https://forum.inductiveautomation.com/t/num-keypad-in-perspective/76435/35 "2025-11-27T21:55:39Z")

</div>

I believe it is on the roadmap.

[Previous page](https://forum.inductiveautomation.com/t/num-keypad-in-perspective/76435.md?page=1)
