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

Announcements

News and Announcements icon
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 Moderator 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard