scrcpy icon indicating copy to clipboard operation
scrcpy copied to clipboard

Adding new option for falling back to clipboard pasting on character injection failures.

Open starrify opened this issue 4 years ago • 9 comments

So that non-ASCII characters may be entered via IMEs. Resolves #37.

Submitting the changes here for now for review. Further documentation work would be needed on README.md and FAQ.md either in this PR or as separate ones if this gets merged early.

starrify avatar Oct 02 '20 22:10 starrify

Hi,

Thank you for the proposal.

Using this method to inject text has drawbacks: https://github.com/Genymobile/scrcpy/pull/1426#issuecomment-633448242 But behind a flag, and only as a fallback, it might be acceptable.

rom1v avatar Oct 03 '20 10:10 rom1v

@npes87184 Any opinion about this?

rom1v avatar Oct 05 '20 21:10 rom1v

I don't like this workaround. From my point of view, instead of adding an option that will be removed eventually, we should find time to actually implement the IME into scrcpy to resolve the problem correctly.

BTW, @rom1v I guess you are doing static build for client now, right?

npes87184 avatar Oct 06 '20 00:10 npes87184

From my point of view, instead of adding an option that will be removed eventually,

Does it work fine for you when you type chinese? One advantage is that it may work without installing an app.

Do you think that it could be enabled by default when the character may not be injected (so that there is no new option)?

I guess you are doing static build for client now, right?

No, until #1753 is solved, I use the last version of FFmpeg built by zeranoe.

rom1v avatar Oct 06 '20 05:10 rom1v

From my point of view, instead of adding an option that will be removed eventually,

Does it work fine for you when you type chinese? One advantage is that it may work without installing an app.

I will give it a try recently (maybe tonight if possible). Yes, without needing to install an app is a benefit in this method and I haven't noticed this.

Do you think that it could be enabled by default when the character may not be injected (so that there is no new option)?

Because the benefit of not having to install apps, I change my mind, I think it is worth to add this workaround in this time. However, too many options is also a problem now. If possible, I stand for not adding new option for this method.

I guess you are doing static build for client now, right?

No, until #1753 is solved, I use the last version of FFmpeg built by zeranoe.

Ok, I will take a look in my free time for static build. BTW, don't give high expectation, I am really busy recently :P.

npes87184 avatar Oct 06 '20 08:10 npes87184

From my point of view, instead of adding an option that will be removed eventually,

Does it work fine for you when you type chinese? One advantage is that it may work without installing an app.

It doesn't work for me. I ran scrcpy with --char-inject-fallback. And I cannot type chinese. Do I need to do something special? Like using some specific IME?

Do you think that it could be enabled by default when the character may not be injected (so that there is no new option)?

I guess you are doing static build for client now, right?

No, until #1753 is solved, I use the last version of FFmpeg built by zeranoe.

npes87184 avatar Oct 06 '20 14:10 npes87184

It doesn't work for me.

Hmm I'm sorry to know that. I also used an IME for Chinese for testing, and the environments are:

  • GNU/Linux x86_64 5.8.10-arch1-1
  • Xorg 1.20.9
  • Gnome-shell 3.36.6 / GDM 3.36.3
  • ibus 1.5.22

Could you share some info on your side so I may have a look?

starrify avatar Oct 06 '20 14:10 starrify

Is there any progress for this PR? @rom1v @npes87184

quyleanh avatar Oct 29 '20 10:10 quyleanh

Please test the new --hid-keyboard on dev branch.

@npes87184 Does IME work perfectly with HID?

rom1v avatar Oct 27 '21 21:10 rom1v