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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Detect F9 Key if pressed

(1) ShareShare
ReportReport
Posted on by 928
Hello,
 
i want to check for F9 key if it is pressed and add a condition to exit a page.
is it possible in BC?

note: we can try on a test page just for simplicity to check if F9 key is pressed and show a message "F9 key is pressed".

Regards,
David
  • Suggested answer
    Yi Yong Profile Picture
    2,789 Super User 2026 Season 1 on at
    Hello David,
     
    You can use the 'ShortcutKey' to fulfil this, however, not all shortcut commands are usable.
     
    Refer to the below Microsoft Learn for the list of shortcut keys that are reserved.
     
     
    To exit a page with conditions, you can use the Trigger OnClosePage.
  • Gerardo Rentería García Profile Picture
    27,621 Super User 2026 Season 2 on at
  • David Tailor Profile Picture
    928 on at
    Hi Guys,
     
    thanks for your answers.
    small comment: the page in question has a type: CardPart, which has some fields for input.
    i need to detect if F9 is pressed to exit the page and return to the main page.
    hope i can achieve this.
     
    Regards,
    David
  • Yi Yong Profile Picture
    2,789 Super User 2026 Season 1 on at
    Hello David,
     
     
    You can use Currpage.close() to exit the current page but it will not bring you back to the main menu.
     
    F9 shortcut key will not work on pages with existing action functions with F9 as their shortcutkey property.
     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 796 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 481 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 377 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans