# Sending Shortcut Commands

**URL:** <https://forum.inductiveautomation.com/t/sending-shortcut-commands/44273>\
**Category:** Ignition\
**Created:** [March 9, 2021, 6:35pm UTC](https://forum.inductiveautomation.com/t/sending-shortcut-commands/44273 "2021-03-09T18:35:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kghali](https://avatars.discourse-cdn.com/v4/letter/k/da6949/32.png) [@kghali](https://forum.inductiveautomation.com/u/kghali)\
**Post date:** [March 9, 2021, 6:35pm UTC](https://forum.inductiveautomation.com/t/sending-shortcut-commands/44273/1 "2021-03-09T18:35:57Z")

</div>

I want to create a button that sends Ctrl+P command in the client scope. I tried using script but it can’t import the required libraries.

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [March 9, 2021, 6:40pm UTC](https://forum.inductiveautomation.com/t/sending-shortcut-commands/44273/2 "2021-03-09T18:40:15Z")

</div>

So from the gateway you want to run a script that tells clients to simulate a keystroke? Besidese the fact this seems kind of sketchy and am unsure if it’s even allowed - whats the end goal here? Do you have some script attached to Control+P in the client event scripts? I think you’re better off creating a client message handler, sending a message from the gateway (or wherever) and have that client message handler run the same script that’s under your Control+P script.

Unless you mean just to paste - but that seems very odd. Whats the context?

---

<div class="post-metadata">

**Author:** ![kghali](https://avatars.discourse-cdn.com/v4/letter/k/da6949/32.png) [@kghali](https://forum.inductiveautomation.com/u/kghali)\
**Post date:** [March 9, 2021, 6:46pm UTC](https://forum.inductiveautomation.com/t/sending-shortcut-commands/44273/3 "2021-03-09T18:46:25Z")

</div>

I created a script fully in perspective and as you know we can’t use the system.print function unless it is a vision view. The original plan was to put a button that prints a QR code generated by the report, but since this can’t happen, then I want to make a button that would open the QR code in a pdf format and then sends the Ctrl+P shortcut.  
I know that we can ask the user to press on the printer’s icon to print the pdf file but some of our employees do need to be trained on how to this and we want to simplify it for them.

---

<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:** [March 9, 2021, 6:48pm UTC](https://forum.inductiveautomation.com/t/sending-shortcut-commands/44273/4 "2021-03-09T18:48:13Z")

</div>

That’s the kind of central control of a browser that bad actors would love to have. Browser makers pretty much are **not** going to let you do this.

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [March 9, 2021, 6:50pm UTC](https://forum.inductiveautomation.com/t/sending-shortcut-commands/44273/5 "2021-03-09T18:50:20Z")

</div>

What @pturmel said. I think the official response you’ll get is that you need to buy the reporting module to do this, or train your staff to work with what you have working now.

There’s no way you can have your browser both open a PDF and then control the client computer outside of the browser scope to run key strokes to print it.

Now for options outside of ignition, perhaps your download is always the same name, in the same spot, and you can have some file watcher application looking for new versions, and when it finds one it prints it. I don’t like adding extra software - just extra points of failure and documentation you have to learn. But this may be an option to look into for you.

---

<div class="post-metadata">

**Author:** ![kghali](https://avatars.discourse-cdn.com/v4/letter/k/da6949/32.png) [@kghali](https://forum.inductiveautomation.com/u/kghali)\
**Post date:** [March 9, 2021, 6:55pm UTC](https://forum.inductiveautomation.com/t/sending-shortcut-commands/44273/6 "2021-03-09T18:55:51Z")

</div>

I agree.  
Is there a way to link a button from the Perspective to a button in the Vision ? so we can run the command from vision view scope instead of perspective
