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 support for Xiaomi Smart Pen Gen2 (and other stylus') features #797

Closed
Leetsch2002 opened this issue Jul 13, 2023 · 10 comments
Closed
Labels
enhancement New feature or request

Comments

@Leetsch2002
Copy link

Motivation

Hi, some pens, like for example the Xiaomi Smart Pen Gen2 or the S Pen by Samsung have extra buttons. With the mentions stylus', you can use the eraser as long as the button is pressed, and are back in the pen mode when letting it go.
So I write something and want to erase the last word, so I hold that button, have the eraser in use, and when I am done erasing, I let it go and I am back in writing mode. This is a huge improvement for workflow and a common feature in Samsung/Xiaomi notes.
As both of them are not open source and in some aspects are also not quite good, I would love to see this functionality in saber.

Solution

As I do not know how complicated and possible it is, to use those pen button inputs and potentially map them, my question is first, if this is even possible.
I own a Samsung Tab S6 Lite and a Xiaomi Pad 6 EU Version with their respective pens and I am motivated to provide any data I can to help development, as well as testing if needed.

Alternatives

No response

Saber version

v0.14.5

Device

  • Device: Xiaomi Pad 6, 8 GB RAM, EU version

  • OS: Android 13, MIUI Pad Global 14.0.3

  • Device: Samsung Galaxy Tab S6 Lite (2019)

  • OS: Android 13, One UI 5.1

Anything else?

No response

@Leetsch2002 Leetsch2002 added the enhancement New feature or request label Jul 13, 2023
@ceskyDJ
Copy link
Contributor

ceskyDJ commented Jul 14, 2023

Hi, as Saber is written in Flutter, where some problems are observed around these extension buttons on pens. It gets better, so Saber has already supported SPen in current versions. I haven't tested it yet, but some changes around this feature have been merged recently.

@ceskyDJ
Copy link
Contributor

ceskyDJ commented Jul 14, 2023

See #783, #785.

@Iey4iej3
Copy link

It gets better, so Saber has already supported SPen in current versions. I haven't tested it yet, but some changes around this feature have been merged recently.

I confirm that the SPen erase button seems to work well on my Samsung S6 Lite with Saber v0.14.6. It also worked on Saber v0.14.5, although there was a small issue which disappeared after upgrading to v0.14.6.

@ceskyDJ
Copy link
Contributor

ceskyDJ commented Jul 14, 2023

@Leetsch2002, could you try it and possibly describe more precisely your observations?

@Leetsch2002
Copy link
Author

Unfortunately, due to Xiaomi's software being... let's say special, I decided to return the Xiaomi tablet. I tried it on 0.14.6 on the Xiaomi device though, it did not work at all.

@ceskyDJ
Copy link
Contributor

ceskyDJ commented Jul 15, 2023

Ok, never mind. What about experience on your Samsung Galaxy Tab S6 Lite?

@Leetsch2002
Copy link
Author

First of all, the S Pen button now works kind of. This is a great improvement!
Why "kind of"?: You can press it and then use it to erase something, but this only works when the tip of the pen is already touching the tablet when pressing it. In Samsung Notes, you can press the button and THEN hit the tablet with the pen's tip to erase something.
Question: Is this intended behavior or a bug that is going to be fixed?
If intended, it would be great to give the user the choice, which of those two behaviors should be used (if this is possible).

@ceskyDJ
Copy link
Contributor

ceskyDJ commented Jul 15, 2023

I'm glad to read that at least SPen works as expected (from my point of view, see the second part) even on older devices. SPens should be covered completely.

Question: Is this intended behavior or a bug that is going to be fixed?

It's a bug of Flutter. It'll be fixed in the future (it's already reported, so it waits for someone, who fixes it).

@adil192 adil192 closed this as not planned Won't fix, can't repro, duplicate, stale Jul 19, 2023
@adil192
Copy link
Member

adil192 commented Jul 19, 2023

Due to the lack of anyone to test it, I'm closing this issue as not planned. We're waiting on better stylus support from the Flutter team anyway so hopefully some of those fixes will benefit the Xiaomi styluses too.

@Elielv235
Copy link
Contributor

First of all, the S Pen button now works kind of. This is a great improvement! Why "kind of"?: You can press it and then use it to erase something, but this only works when the tip of the pen is already touching the tablet when pressing it. In Samsung Notes, you can press the button and THEN hit the tablet with the pen's tip to erase something. Question: Is this intended behavior or a bug that is going to be fixed? If intended, it would be great to give the user the choice, which of those two behaviors should be used (if this is possible).

i think that it should work this way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants