wsvn53 / scrcpy-mobile

Ported scrcpy for mobile platforms, to remotely control Android devices on your iPhone or Android phone.
MIT License
588 stars 33 forks source link

Feature Request: Allow to pin the keyboard so it's open all the time if needed #61

Open plia7 opened 8 months ago

plia7 commented 8 months ago

Hello,

Could you please add an option where you can pin the native iOS keyboard to be open all the time if needed, so if you touch the screen in another area it won't hide the keyboard?

This is useful as sometimes when you type something it shows you auto complete or auto correct words that you need to press on them on the screen which causes the native iOS keyboard to disappear.

Instead it should let the native iOS keyboard continue to show in case I need to continue to type and occasionally interact with the screen (pressing auto complete/auto correct words, etc) if that make sense. Otherwise I need to keep re-opening the keyboard every time I touch the screen which is not convenient and makes it not very productive when trying to use the native iOS keyboard when lots of typing needed is needed.

Thank you.

plia7 commented 8 months ago

Hello @wsvn53 As discussed, let me explain the justification for this feature:

I tried to use the remote soft keyboard of Android, but It's too slow and prone to errors to try to type on the target Android soft keyboard that’s on the target screen rather than sending the keystrokes from the client connecting iOS side native soft keyboard. It’s especially true if you are facing a less stable connection. So typing in the native iOS soft keyboard is much better, more efficient and less prone to errors since sending keystrokes from local keyboard has less latency than relying on passing touch screen strokes on a screen that could be lagged because of the connection.

Other remote desktop apps to android including TeamViewer allow this without any problem.

Here is a case study how it looks in TeamViewer in the two attached screenshots, I’ll explain each figure marked in the screenshots:

image

  1. For example, I typed “Hel” which could be either incomplete word or incorrect word.
  2. Auto correct/Auto complete is offering to press the “Hello” word.
  3. A keyboard icon exists in the app menu that allows you to open the native ios keyboard.

image

  1. Once the keyboard is open, you can still press on the suggested “Hello” word on the screen, without the keyboard closing (in scrcpy-ios, the keyboard automatically closes as soon as I press the “Hello” word or the screen area outside native iOS keyboard portion).
  2. There is a button that allows you to close the keyboard when you are done using it.
  3. This is not the best example how to do it as the extra menu line on top of the native ios keyboard that TeamViewer added is blocking some of the suggested words for auto complete/correct so better allow to pin the keyboard ahead of time or in a different menu so it doesn’t interfere or block the screen auto complete/correct words.

I hope you will consider this and I was able to convince you.

Please let me know if you have any questions.

Thank you.

wsvn53 commented 7 months ago

Ok, maybe I understand what you want, but this may change the current navigation bar structure, I need to consider its rationality.

plia7 commented 7 months ago

Ok, maybe I understand what you want, but this may change the current navigation bar structure, I need to consider its rationality.

Thank you, this could be a great help. If you don't want to change the navigation bar structure, maybe it can be a secret ios url scheme that you pass? i.e. scrcpy2://192.168.1.156:36605?stay-awake=true&pin-keyboard=true

Or something like that, just an idea.

Thanks.

plia7 commented 7 months ago

Ok, maybe I understand what you want, but this may change the current navigation bar structure, I need to consider its rationality.

@wsvn53 Let me know if you need my help testing it in test flight.

Thanks.