Commit Graph

980 Commits (1c44dc2259f7111f8432fcf1ab8509c68f48d9a0)
 

Author SHA1 Message Date
Romain Vimont 1c44dc2259 Use portable shebang for all bash scripts
Refs #426 <https://github.com/Genymobile/scrcpy/pull/426>
Refs #1716 <https://github.com/Genymobile/scrcpy/pull/1716>
4 years ago
Luís Ferreira 02a882a0a2 Use a more portable shebang for bash
This should increase the portability of bash scripts across various *nix
systems such as BSD-like distributions.

PR #1716 <https://github.com/Genymobile/scrcpy/pull/1716>

Signed-off-by: Luís Ferreira <contact@lsferreira.net>
Signed-off-by: Romain Vimont <rom@rom1v.com>
4 years ago
CapsLock cf7bf3148c Use "/usr/bin/env bash" for build-wrapper.sh
PR #426 <https://github.com/Genymobile/scrcpy/pull/426>

Signed-off-by: Romain Vimont <rom@rom1v.com>
4 years ago
Romain Vimont ae758f99d6 Adapt call() on ContentProvider for Android 11
This commit in AOSP framework_base added a parameter "attributionTag" to
the call() method:
12ac3f406f%5E%21/#F17

As a consequence, the method did not exist, so scrcpy used the legacy
call() method (using the authority "unknown") as a fallback, which fails
for security reasons.

Fixes #1468 <https://github.com/Genymobile/scrcpy/issues/1468>
4 years ago
Romain Vimont bd9f656933 Fix feature test macro
The expected feature test macro is _POSIX_C_SOURCE having a value
greater or equal to 200809L.

Fixes #1726 <https://github.com/Genymobile/scrcpy/issues/1726>
4 years ago
Romain Vimont c243fd4c3f Fix more log format warning
The expression port + 1 is promoted to int, but printed as uint16_t.

This is the same mistake fixed for a different log by
7eb16ce364.

Refs #1726 <https://github.com/Genymobile/scrcpy/issues/1726>
4 years ago
brunoais 0bf110dd5c Reset power mode only if screen is on
PR #1670 <https://github.com/Genymobile/scrcpy/pull/1670>

Signed-off-by: Romain Vimont <rom@rom1v.com>
4 years ago
Romain Vimont 0c5e0a4f6d Make Device methods static when possible
The behavior of some methods do not depend on the user-provided options.
These methods can be static. This will allow to call them directly from
the cleanup process.
4 years ago
Romain Vimont 0be766e71a Add undetected device error message in FAQ 4 years ago
Romain Vimont d02789ce21 List available shortcut keys on error
Fixes #1681 <https://github.com/Genymobile/scrcpy/issues/1681>

Suggested-by: Moritz Schulz <moritzleni@gmail.com>
4 years ago
Romain Vimont 6cc22e1c5b Reference --shortcut-mod from shortcuts list
Fixes #1681 <https://github.com/Genymobile/scrcpy/issues/1681>

Suggested-by: Moritz Schulz <moritzleni@gmail.com>
4 years ago
Romain Vimont 479d10dc22 Update links to v1.16 in README and BUILD 4 years ago
Romain Vimont d7779d08e8 Bump version to 1.16 4 years ago
Romain Vimont df4ba1b8b0 Merge branch 'master' into dev 4 years ago
Romain Vimont 198346d148 Add pinch-to-zoom simulation
If Ctrl is hold when the left-click button is pressed, enable
pinch-to-zoom to scale and rotate relative to the center of the screen.

Fixes #24 <https://github.com/Genymobile/scrcpy/issues/24>
4 years ago
RaenonX JELLYCAT 8081e9cc11 Add reference of the translations in README
Reviewed-by: Yu-Chen Lin <npes87184@gmail.com>
Signed-off-by: Romain Vimont <rom@rom1v.com>
4 years ago
RaenonX JELLYCAT b87a0df99a Add Traditional Chinese translation for README
Reviewed-by: Yu-Chen Lin <npes87184@gmail.com>
Signed-off-by: Romain Vimont <rom@rom1v.com>
4 years ago
Romain Vimont 95f1ea0d80 Fix clipboard paste condition
To avoid possible copy-paste loops between the computer and the device,
the device clipboard is not set if it already contains the expected
content.

But the condition was wrong: it was not set also if it was empty.

Refs 1223a72eb8
Fixes #1658 <https://github.com/Genymobile/scrcpy/issues/1658>
4 years ago
Romain Vimont 38940ffe89 Revert "Inject WAKEUP instead of POWER"
WAKEUP does not work on some devices.

Fixes #1655 <https://github.com/Genymobile/scrcpy/issues/1655>

This reverts commit 322f1512ea.
4 years ago
Yu-Chen Lin a59a15777d Fix missing change of Ctrl key in README
PR #1652 <https://github.com/Genymobile/scrcpy/pull/1652>

Signed-off-by: Romain Vimont <rom@rom1v.com>
4 years ago
Jozef Hollý a2cb63e344 Add packaging status
PR #1650 <https://github.com/Genymobile/scrcpy/pull/1650>

Signed-off-by: Romain Vimont <rom@rom1v.com>
4 years ago
Romain Vimont f03a3edde6 Update links to v1.15.1 in README and BUILD 4 years ago
Romain Vimont 633a51e9c4 Bump version to 1.15.1 4 years ago
Romain Vimont 976761956f Fix uninitialized repeat count in key events
A new "repeat" field has been added by
3c1ed5d86c, but it was not initialized in
every code path.

As a consequence, keycodes generated by shortcuts were sent with an
undetermined value, breaking some shortcuts (especially HOME) randomly.

Fixes #1643 <https://github.com/Genymobile/scrcpy/issues/1643>
4 years ago
Romain Vimont 521f2fe994 Update links to v1.15 in README and BUILD 4 years ago
Romain Vimont edc4f7675f Bump version to 1.15 4 years ago
Romain Vimont 712f1fa6b2 Upgrade FFmpeg (4.3.1) for Windows
Include the latest version of FFmpeg in Windows releases.
4 years ago
Romain Vimont 1ba06037f8 Upgrade platform-tools (30.0.4) for Windows
Include the latest version of adb in Windows releases.
4 years ago
Romain Vimont da63e3774b Merge branch 'master' into dev 4 years ago
brunoais cf9d44979c Keep the screen off on powering on
PR #1577 <https://github.com/Genymobile/scrcpy/pull/1577>
Fixes #1573 <https://github.com/Genymobile/scrcpy/issues/1573>

Signed-off-by: Romain Vimont <rom@rom1v.com>
4 years ago
xeropresence 84f1d9e375 Add --no-key-repeat cli option
Add an option to avoid forwarding repeated key events.

PR #1623 <https://github.com/Genymobile/scrcpy/pull/1623>
Refs #1013 <https://github.com/Genymobile/scrcpy/issues/1013>

Signed-off-by: Romain Vimont <rom@rom1v.com>
4 years ago
xeropresence 65d06a3663 Pass full options struct to static functions
This avoids to pass specific options values individually. Since these
function are static (internal to the file), this is not a problem to
make them depend on scrcpy_options.

Refs #1623 <https://github.com/Genymobile/scrcpy/pull/1623>

Signed-off-by: Romain Vimont <rom@rom1v.com>
4 years ago
Romain Vimont 74079ea5e4 Copy the options used in input manager init
This avoids to pass additional options to some input manager functions.

Refs #1623 <https://github.com/Genymobile/scrcpy/pull/1623>
4 years ago
Romain Vimont 0870d8620f Mention that MENU unlocks screen
Pressing MENU while in lock screen unlocks (it still asks for the schema
or code if enabled).
4 years ago
Romain Vimont d49cffb938 Use <kbd> HTML tag for keys
It's prettyier in a browser.
4 years ago
Romain Vimont dfb7324d7b Mention in README that Ctrl is forwarded 4 years ago
Romain Vimont d8b3ba170c Update copy-paste section in README
Update documentation regarding the recent copy-paste changes.
4 years ago
Romain Vimont 7ad47dfaab Swap paste shortcuts
For consistency with MOD+c and MOD+x, use MOD+v to inject PASTE.

Use Mod+Shift+v to inject clipboard content as a sequence of text
events.
4 years ago
Romain Vimont 56a115b5c5 Add shortcuts for COPY and CUT
Send COPY and CUT on MOD+c and MOD+x (only supported for Android >= 7).

The shortcuts Ctrl+c and Ctrl+x should generally also work (even before
Android 7), but the active Android app may use them for other actions
instead.
4 years ago
Romain Vimont 8f64a5984b Change "resize to fit" shortcut to MOD+w
For convenience, MOD+x will be used for injecting the CUT keycode.
4 years ago
Romain Vimont bccd12bf5c Remove "get clipboard" call
Now that every device clipboard change is automatically synchronized to
the computer, the "get clipboard" request (bound to MOD+c) is useless.
4 years ago
Romain Vimont 20d3925099 Set computer clipboard only if necessary
Do not explicitly set the clipboard text if it already contains the
expected content.

Even if copy-paste loops are avoided by the previous commit, this avoids
to trigger a clipboard change on the computer-side.

Refs #1580 <https://github.com/Genymobile/scrcpy/issues/1580>
4 years ago
Romain Vimont 1223a72eb8 Set device clipboard only if necessary
Do not explicitly set the clipboard text if it already contains the
expected content. This avoids possible copy-paste loops between the
computer and the device.
4 years ago
Romain Vimont 7683be8159 Synchronize clipboard on Ctrl+v
Pressing Ctrl+v on the device will typically paste the clipboard
content.

Before sending the key event, synchronize the computer clipboard to the
device clipboard to allow seamless copy-paste.
4 years ago
Romain Vimont d4ca85d6a8 Forward Shift to the device
This allows to select text using Shift+(arrow keys).

Fixes #942 <https://github.com/Genymobile/scrcpy/issues/942>
4 years ago
Romain Vimont e6e528f228 Forward Ctrl to the device
Now that the scrcpy shortcut modifier is Alt by default (and can be
configured), forward Ctrl to the device.

This allows to trigger Android shortcuts.

Fixes #555 <https://github.com/Genymobile/scrcpy/issues/555>
4 years ago
Romain Vimont a5f8b577c5 Ignore text events for shortcuts
Pressing Alt+c generates a text event containing "c", so "c" was sent to
the device when --prefer-text was enabled.

Ignore text events when the mod state matches a shortcut modifier.
4 years ago
Romain Vimont e4bb7c1d1f Accept Super as shortcut modifier
In addition to (left) Alt, also accept (left) Super. This is especially
convenient for macOS users (Super is the Cmd key).
4 years ago
Romain Vimont 1b76d9fd78 Customize shortcut modifier
Add --shortcut-mod, and use Alt as default modifier.

This paves the way to forward the Ctrl key to the device.
4 years ago
Romain Vimont 63cb93d7d7 Use Ctrl for all shortcuts
Remove the Cmd modifier on macOS, which was possible only for some
shortcuts but not all.

This paves the way to make the shortcut modifier customizable.
4 years ago