dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.28k stars 1.76k forks source link

ITextInput extensions for interacting with platform soft input (keyboard) #11565

Closed PureWeen closed 1 year ago

PureWeen commented 2 years ago

Description

Implement a set of APIs that allows the user to interact with the Soft Input InputPane Device. These APIs don't have anything to do with a physical InputPane.

MAUI Community Toolkit

MCT implemented these APIs for .NET7 as extension methods https://learn.microsoft.com/en-us/dotnet/communitytoolkit/maui/extensions/keyboard-extensions. This has allowed users easy access to these APIs until we can release official APIs for .NET8. Once we implemented these features into .NET8 then MCT will deprecate their APIs for the .NET8 builds.

API Changes

We've implemented these inside MCT as extension methods. The plan is to copy the extension methods that are part of MCT into MAUI and then MCT will obsolete them on .NET8.

https://learn.microsoft.com/en-us/dotnet/communitytoolkit/maui/extensions/InputPane-extensions

We can then expose the rest of the APIs through an Info class possibly inside Essentials.

Extension Methods

API Description
ShowSoftInputAsync(this ITextInput) Opens the current software input pane and returns true if successful
HideSoftInputAsync(this ITextInput) Closes the current software input pane and returns true if successful
IsSoftInputShowing(this ITextInput) Indicates if the current software input pane is showing

Related Specs

https://github.com/dotnet/maui/issues/11562

Validations

Usage Scenarios

TBD

Backward Compatibility

N/A

Difficulty

Medium

ghost commented 2 years ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.