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 Apps / How to Trigger Action ...
Power Apps
Unanswered

How to Trigger Action on Enter Key Press in TextInput Field?

(0) ShareShare
ReportReport
Posted on by 2

Hi Power Apps Community,

I'm currently working on a Power App where I want to trigger a specific action, like navigating to the next screen, when the Enter key is pressed in a TextInput field. However, I've noticed that while the Tab key works as expected (jump to another TextInput field), the Enter key doesn't seem to trigger the intended action.

Here's the relevant part of my code:

 

If(
!IsBlank(TextInput1.Text) &&
Code(TextInput1.Text) = 13, // 13 is the Unicode value for Enter key
Set(varABC, true);
Navigate(NextScreen)
)


The issue I'm encountering is the action is not triggered.

I've researched and tried various approaches, but none seem to work as expected. Can anyone in the community provide guidance on the correct way to capture the Enter key press event in a TextInput field and execute a specific action?

Thank you for your assistance!

Categories:
I have the same question (0)
  • ANB Profile Picture
    7,252 Super User 2026 Season 1 on at

    Hi @Anonym_2 , On change property should work for you --- the OnChange is only actioned after the user has changed the text input and then tabbed, entered or clicked out of the text Input .

    If(
    !IsBlank(TextInput1.Text) && Code(TextInput1.Text) = 13, 
    Set(varABC, true);
    Navigate(NextScreen)
    )

    To make sure that user does not add empty string in text input control, that is reason we use Trim function to make sure that any blank string is removed. 

     

    NOTE: Not sure about Code(TextInput1.Text) function that you used in the above code.

    -----------------------------------------------------------------------------------------------------------------------------

    I hope this helps.

    Please click Accept as solution ✅ if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs up.👍

    Thanks,
    ANB


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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 638

#2
Haque Profile Picture

Haque 317

#3
WarrenBelz Profile Picture

WarrenBelz 315 Most Valuable Professional

Last 30 days Overall leaderboard