# Keyboard Function key mapping with memory tag

**URL:** <https://forum.inductiveautomation.com/t/keyboard-function-key-mapping-with-memory-tag/94874>\
**Category:** General Discussion\
**Tags:** vision\
**Created:** [August 20, 2024, 9:52am UTC](https://forum.inductiveautomation.com/t/keyboard-function-key-mapping-with-memory-tag/94874 "2024-08-20T09:52:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mohammed\_Afzal](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Mohammed\_Afzal](https://forum.inductiveautomation.com/u/Mohammed_Afzal)\
**Post date:** [August 20, 2024, 9:52am UTC](https://forum.inductiveautomation.com/t/keyboard-function-key-mapping-with-memory-tag/94874/1 "2024-08-20T09:52:30Z")

</div>

How can we map a keyboard function key F1, F2,......F12 on a memory tag of ignition and then to write in PLC tag? Tag of boolean type. I want to use these function key as push button. 1 when pressed 0 when released.

---

<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:** [August 20, 2024, 1:56pm UTC](https://forum.inductiveautomation.com/t/keyboard-function-key-mapping-with-memory-tag/94874/3 "2024-08-20T13:56:51Z")

</div>

> **[Client Event Scripts | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/ignition-modules/vision/scripting-in-vision/client-event-scripts#keystroke-scripts)**
>
> Client Event Scripts Overview

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [August 20, 2024, 3:01pm UTC](https://forum.inductiveautomation.com/t/keyboard-function-key-mapping-with-memory-tag/94874/4 "2024-08-20T15:01:57Z")

</div>

> [@Mohammed\_Afzal](#):
>
> I want to use these function key as push button. 1 when pressed 0 when released.

This is the definition of a "momentary pushbutton". Using keyboard press/release to implement this won't be any more reliable than using a button component's mouse press/release events.

There are continuous messaging techniques that can make a button component highly reliable within Vision, but those require back-checking the mouse status while messaging. Such would have to be figured out for keyboard events across the entire client.

More reading:

[https://forum.inductiveautomation.com/search?q=momentary%20button%20stuck%20order%3Alatest](https://forum.inductiveautomation.com/search?q=momentary%20button%20stuck%20order%3Alatest)

TL/DR: Don't do this. Use a different paradigm to control your process, even if you must change PLC code to do it.
