Canvas Apps Expressions UI

Choosing default keyboard for text input fields

I was going through different apps on my phone (which I think is a good way to figure out functionality that can help Power Apps work more like native apps). One thing that stood out was that different keyboards showed up based on the type of text input fields. This really adds to the user experience because if there is a text input that is only supposed to have numbers it helps if the numeric keyboard shows up and similarly a text keyboard shows up for a text input field that is supposed to have text. This prevents the need for the user to switch keyboards.

So I wanted to check if there was a way to implement that in Power Apps. To my surprise, there is an out-of-the-box text input control property that lets you achieve exactly this - keyboard type based on the type of input. This is one of those features that started off as an idea found here. The existence of this property be known to a few, or may be many, Power Addicts but since I wasn't aware of this, I decided to share it here and spread the knowledge!

The property that controls this behavior is VirtualKeyboardMode. It has 3 possible values: Auto, Numeric, and Text. While Numeric and Text are obvious, Auto means that the mode will default to the mode of the text input control. With this setting in place for two different text input controls (one with a VirtualKeyboardMode set to Numeric and the other set to Text), here's the behavior:

Default Keyboard mode (click to enlarge)

If you were not aware of this property, enjoy a better experience now with text input fields!

Have fun! Get addicted!

Leave a Reply