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 --raw-key-events #2831

Merged
merged 3 commits into from
Nov 29, 2021
Merged

Add --raw-key-events #2831

merged 3 commits into from
Nov 29, 2021

Conversation

rom1v
Copy link
Collaborator

@rom1v rom1v commented Nov 26, 2021

This option allows to inject all input keys as key events, and ignore text events.

Fixes #2816.


This feature is available in scrcpy v1.21.

obsolete

Here are binaries so that you can test easily. Please replace these files in your v1.20 release:

  • scrcpy.exe sha256:c3d96408d81d4c3f17259a8d99bd2e343f6c9758dc85e6317b114f6cdc95fd00
  • scrcpy-server sha256:e08e9aa4796c213bf601f6323b5e9f4fce250b1f3b1d46441289824cb4af294a
old binaries v1
  • scrcpy.exe sha256:848fc28d0b2e864fabcd82f327ddb1ee987fc364f441deed262b8f733fe7298d
  • scrcpy-server sha256:e08e9aa4796c213bf601f6323b5e9f4fce250b1f3b1d46441289824cb4af294a

This is based on the development branch, and includes #2827, so this is almost a release candidate for scrcpy 1.21.

Please test and report any issue you might encounter. In particular, please test the --tcpip option detailed in #2827.

Thank you.

@Helaer
Copy link

Helaer commented Nov 27, 2021

This option allows to inject all input keys as key events, and ignore text events.

Fixes #2816.

Here are binaries so that you can test easily. Please replace these files in your v1.20 release:

  • scrcpy.exe sha256:848fc28d0b2e864fabcd82f327ddb1ee987fc364f441deed262b8f733fe7298d
  • scrcpy-server sha256:e08e9aa4796c213bf601f6323b5e9f4fce250b1f3b1d46441289824cb4af294a

This is based on the development branch, and includes #2827, so this is almost a release candidate for scrcpy 1.21.

Please test and report any issue you might encounter. In particular, please test the --tcpip option detailed in #2827.

Thank you.

After my test, after enabling --raw-key-events, the following problems occurred. The left bracket cannot be input, and the left bracket cannot be input in both English and non-English states, and the number 9 cannot be input.

20211127103813

{SDLK_6, AKEYCODE_6},
{SDLK_7, AKEYCODE_7},
{SDLK_8, AKEYCODE_8},
{SDLK_8, AKEYCODE_9},
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops.

@rom1v
Copy link
Collaborator Author

rom1v commented Nov 27, 2021

Thank you. Indeed, there is a typo for the 9 👍

@rom1v
Copy link
Collaborator Author

rom1v commented Nov 28, 2021

I pushed a new version, please re-test 😉

@Helaer
Copy link

Helaer commented Nov 29, 2021

我推送了一个新版本,请重新测试 😉

--raw-key-events works well on my device, you can merge it.

This improves readability (hopefully).

PR #2831 <#2831>
There was only two key injection modes:
 - the default one
 - the mode with --prefer-text enabled

To prepare the addition of another mode (--raw-key-events), use an enum
instead of a bool.

PR #2831 <#2831>
This option allows to inject all input keys as key events, and ignore
text events.

Fixes #2816 <#2816>
PR #2831 <#2831>
@rom1v rom1v changed the base branch from dev.wip to dev November 29, 2021 20:19
@rom1v rom1v merged commit bd56d81 into dev Nov 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants