# How to make onKeyDown specific to one key?

**URL:** <https://forum.inductiveautomation.com/t/how-to-make-onkeydown-specific-to-one-key/107200>\
**Category:** Ignition\
**Tags:** ignition81, python, scripting, perspective\
**Created:** [June 9, 2025, 10:46pm UTC](https://forum.inductiveautomation.com/t/how-to-make-onkeydown-specific-to-one-key/107200 "2025-06-09T22:46:12Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [June 9, 2025, 10:47pm UTC](https://forum.inductiveautomation.com/t/how-to-make-onkeydown-specific-to-one-key/107200/2 "2025-06-09T22:47:50Z")

</div>

You asked this question just a little while ago over here:

> [@OnKeyDown event to trigger RequestPrint for PowerChart component not working](https://forum.inductiveautomation.com/t/onkeydown-event-to-trigger-requestprint-for-powerchart-component-not-working/107197):
>
> Hi, I am working with a Power Chart component. I wish there was a sliding Trace I want two things: Print the view using component action. X Trace to have values at the time of printing. X Trace only shows values when your mouse cursor is hovering over the chart. Can't print using a button because of this. So, I have configured an onKeyDown event to trigger the RequestPrint action for the Power Chart. This way, whenever you have placed your mouse over the instant you want the X Trac…

Multiple posts are against this [forum's rules](https://forum.inductiveautomation.com/faq).

---

_[View the full topic](https://forum.inductiveautomation.com/t/how-to-make-onkeydown-specific-to-one-key/107200)._
