dotnet / dotnet/maui

Add "Keyboard.None"

Open
#10,331 6 comments 11 reactions 0 assignees View on GitHub
area-keyboard help wanted legacy-area-controls proposal/open
Dominant language
C#
Stars
23.3k
Forks
2k
Avg merge
1d 10h
Merged PRs (30d)
297

Description

### Description

Currently I can only choose _what_ type of keyboard I want for a specific `Entry`, but in order to fully disable the keyboard I have to do some weird workarounds with `#if`s and custom renderers involved: https://stackoverflow.com/questions/73199602/need-a-way-to-hide-soft-keyboard-in-mauis-editor-entry-fields (the first link in google search for me). I think such capability should be implemented on platform layer and be available to all MAUI users without that much effort to use it.

The end result of this proposal should look like this (taken from the article about how to implement such feature in Xamarin, which also didn't have a build-in solution for it):
![](https://theconfuzedsourcecode.files.wordpress.com/2017/05/entry-with-no-softkeyboard-android.gif)

### Public API Changes

In https://github.com/dotnet/maui/blob/main/src/Core/src/Primitives/Keyboard.cs:
```diff
public class Keyboard
{
...
+ public static Keybord None
+ {
+ ...
+ }
}
```

https://github.com/dotnet/maui/blob/main/src/Core/src/Converters/KeyboardTypeConverter.cs should also be modified.

### Intended Use-Case

Well, see almost any calculator app for reference. It provides an input field but doesn't trigger the system keyboard when tapped/clicked. In general the feature would be _very_ useful when the app needs a specific control over what user is typing. Such apps usually have their own keyboard or a limited set of buttons for data input

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.