Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Keyboard.None" #10331

Open
DoctorKrolic opened this issue Sep 26, 2022 · 6 comments
Open

Add "Keyboard.None" #10331

DoctorKrolic opened this issue Sep 26, 2022 · 6 comments
Labels
area-keyboard Keyboard, soft keyboard help wanted [up-for-grabs] Good issue for external contributors legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor proposal/open
Milestone

Comments

@DoctorKrolic
Copy link

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 #ifs 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):

Public API Changes

In https://github.com/dotnet/maui/blob/main/src/Core/src/Primitives/Keyboard.cs:

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

@Eilon Eilon added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Sep 26, 2022
@PureWeen PureWeen added the help wanted [up-for-grabs] Good issue for external contributors label Sep 27, 2022
@PureWeen PureWeen added this to the Backlog milestone Sep 27, 2022
@ghost
Copy link

ghost commented Sep 27, 2022

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.

@Redth
Copy link
Member

Redth commented Nov 22, 2022

@PureWeen how does this fit into the focus/keyboard story?

@PureWeen
Copy link
Member

@DoctorKrolic @ChaplinMarchais

Is there a way to implement this that's natural on the platform? The SO post that you linked to is a bit random with what everyone on that thread is talking about.

The implementation here
https://theconfuzedsourcecode.wordpress.com/2017/05/19/a-keyboard-disabled-entry-control-in-xamarin-forms/

Is very unnatural to the platform.

My hope is to get some Keyboard Manager APIs built into the community toolkit and built into .NET8
CommunityToolkit/Maui#969

I think that will handle your scenario here so that you can add behavior to hide the keyboard yourself.

@DoctorKrolic
Copy link
Author

Is there a way to implement this that's natural on the platform? The SO post that you linked to is a bit random with what everyone on that thread is talking about.

I honestly have no idea. This was the feature I needed and it seems many other people need as well. So I created an issue for it. I am not familiar with platform-specific stuff unfortunately

@samhouts samhouts modified the milestones: Backlog, Under Consideration Jul 26, 2023
@samhouts
Copy link
Member

I believe you can now achieve this with CommunityToolkit/Maui#1064.

@pictos
Copy link
Contributor

pictos commented Jul 26, 2023

@PureWeen can you confirm it?

@Eilon Eilon added the area-keyboard Keyboard, soft keyboard label May 13, 2024
@PureWeen PureWeen modified the milestones: Under Consideration, Backlog Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-keyboard Keyboard, soft keyboard help wanted [up-for-grabs] Good issue for external contributors legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor proposal/open
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants