# Ignition Vision On screen Keyboard event script

**URL:** <https://forum.inductiveautomation.com/t/ignition-vision-on-screen-keyboard-event-script/105502>\
**Category:** Ignition\
**Tags:** ignition81, vision\
**Created:** [April 24, 2025, 8:42am UTC](https://forum.inductiveautomation.com/t/ignition-vision-on-screen-keyboard-event-script/105502 "2025-04-24T08:42:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![emanuele\_cirillo](https://avatars.discourse-cdn.com/v4/letter/e/aeb1de/32.png) [@emanuele\_cirillo](https://forum.inductiveautomation.com/u/emanuele_cirillo)\
**Post date:** [April 24, 2025, 8:42am UTC](https://forum.inductiveautomation.com/t/ignition-vision-on-screen-keyboard-event-script/105502/1 "2025-04-24T08:42:40Z")

</div>

Hi, I'm Emanuele.  
I need some advice, before writing I browsed the forums, but I couldn't find a solution to my problem.

I want to write a tag when I press the enter key (not the windows keyboard) of the on-screen keyboard that appears in runtime, but I didn't find anything about it, I can only do it from the client event, but with the real keyboard that is not connected because the panel PC is only touch.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/b/1be655e94348bb37c1e0758fabab3fc63f775292.png)

Can anyone help me?

Thanks

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 24, 2025, 2:50pm UTC](https://forum.inductiveautomation.com/t/ignition-vision-on-screen-keyboard-event-script/105502/2 "2025-04-24T14:50:52Z")

</div>

I don't quite understand what you're asking, but maybe this helps.

You can invoke the numeric keypad from a script:

> **[system.gui.showNumericKeypad | Ignition User Manual](https://docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-gui/system-gui-show-NumericKeypad)**
>
> Displays a modal on-screen numeric keypad, allowing for arbitrary numeric entry using the mouse, or a finger on a touchscreen monitor.

The function is _blocking_, meaning script execution will not continue until the user has either pressed 'Ok' or 'Cancel' on the keypad.  
So you can capture the return value in a variable, perform some validation on it, and then write it to a tag with `system.tag.writeBlocking`.

---

<div class="post-metadata">

**Author:** ![emanuele\_cirillo](https://avatars.discourse-cdn.com/v4/letter/e/aeb1de/32.png) [@emanuele\_cirillo](https://forum.inductiveautomation.com/u/emanuele_cirillo)\
**Post date:** [April 24, 2025, 4:56pm UTC](https://forum.inductiveautomation.com/t/ignition-vision-on-screen-keyboard-event-script/105502/3 "2025-04-24T16:56:35Z")

</div>

I want to write a tag when I press OK or Cancel on screen keypad, can I capture the Press event of the OK button?

example I want to write a string tag, if I press the OK button I write "OK", if I press Cancel I write "Cancel"

If it is possible, how can I do it?

Thanks

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 24, 2025, 5:02pm UTC](https://forum.inductiveautomation.com/t/ignition-vision-on-screen-keyboard-event-script/105502/4 "2025-04-24T17:02:24Z")

</div>

No, you can't add listeners or in any other way inspect what's happening while the keypad is open - it's modal, meaning all other event processing, including scripts, is paused.

The way the function works means that it will _always_ return a value. If the user chooses to cancel, the returned value will be the same as whatever the original value was. Depending on your process, you could invoke it with some definitely-not-correct value, such as 0, and check whether the return value was 0. That's as good as you can get **with the built in keypad and scripting function**.

If you want more customization, you would have to make your own popup window that acts as a keypad, and be in charge of opening it whenever appropriate.
