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

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

How to detect key pressed on keyboard?

(0) ShareShare
ReportReport
Posted on by

Hello EveryOne,

I want to detect the key when ever I pressed on a keyboard inside a form a form but not in a field.  I know there are Keypress methods but they only works on text not on the window of a form. I want something like AddEventListener.

Best Regards.

Mohammad Khubaib 

I have the same question (0)
  • Suggested answer
    Adrian Begovich Profile Picture
    1,027 Moderator on at
    RE: How to detect key pressed on keyboard?

    Hi Mohammad Khubaib,

    The keypress methods are your only good option. On load JavaScript may also meet your requirement.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Mansi Soni – Community Spotlight

We are honored to recognize Mansi Soni as our August 2025 Community…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Hamza H Profile Picture

Hamza H 141

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 132

#3
DAnny3211 Profile Picture

DAnny3211 130

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans