web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to press a button ...
Power Automate
Unanswered

How to press a button for a long time, such as long press keyboard ‘A’

(0) ShareShare
ReportReport
Posted on by

How to press a button for a long time, such as long press keyboard A.
I hope someone can answer it for me. Thank you.

I have the same question (0)
  • Deenuji_Loganathan_ Profile Picture
    6,250 Super User 2025 Season 2 on at

    @xiaonuo 

     

    Not sure your full requirement, but you use this for X number time press on specific key:

    Deenuji_0-1714377460695.png

    In case if you want long press ctrl or shift or Alt or Win, use the below action.

     

    Deenuji_1-1714377504816.png

     

     


    Thanks,
    Deenuji Loganathan 👩‍💻
    Automation Evangelist 🤖
    Follow me on LinkedIn 👥

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🚀

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    I agree with @Deenuji,

    Long press "A" is not functional natively in PAD.  You could try another scripting language and call it from PAD.

     

    Here is a tested PowerShell version developed by my CustomGPT - PAD Assistant:

    Scripting.RunPowershellScript.RunPowershellScript Script: $'''Add-Type -AssemblyName System.Windows.Forms
    [System.Windows.Forms.SendKeys]::SendWait(\"a\")
    Start-Sleep -Seconds 5
    [System.Windows.Forms.SendKeys]::SendWait(\"{a up}\")''' ScriptOutput=> PowershellOutput

    I ran this against a blank Word document and set Focus Window on it before applying this script.

    Note:  when I manually hold "a" for 5 seconds in Word, I get a lot of As.  This could be a behavior of Word or some interaction between Word and the keyboard to press/release repeatedly.

     

    When I run the above script, there is only 1 "a" in my word document, so that is something to keep in mind.

     

    Good luck,

     

    Mike

    PS:  if you have a paid GPT subscription and would like access to the PAD Assistant Custom GPT, please feel free to reach out.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard