diff --git a/README.md b/README.md index 4a7aeff..0043020 100644 --- a/README.md +++ b/README.md @@ -10,9 +10,10 @@ I am an Android Developer myself and I always use scrcpy ❤ to test my work on - Run scrcpy on multiple devices effortlessly - Disconnect WiFi Devices - Connect WiFi Devices -- All options from [scrcpy](https://github.com/Genymobile/scrcpy) are configurable from the UI +- All options from [scrcpy v1.16](https://github.com/Genymobile/scrcpy) are configurable from the UI - Quick *Shortcuts* button for you to remember scrcpy shortcuts - Easy installation, scrcpy does not need to be added in your system's PATH Variable +- *Shortcuts* are directly loaded from scrcpy's GitHub README if you are connected to the internet, else static shortcuts are loaded from scrcpy v1.16 ## Requirements 1. Works on Android Studio 4.0+ and other IntelliJ-based IDEs with build number `193.4099.13` and above @@ -30,6 +31,7 @@ I am an Android Developer myself and I always use scrcpy ❤ to test my work on 1. Restarting adbd in tcpip mode (uses the port entered in `ADB WiFi` section or `5555` (default)) 2. Extract device's local WiFi IP and run's `adb connect` on the extracted IP - You can configure advanced, rarely-used options for scrcpy from IDE Settings -> Tools -> Scrcpy Controller +- Devices with `scrcpy` currently running have a `•` added to their serial ## Screenshots | Main Tool Window | Settings | Shortcuts dialog | @@ -44,6 +46,7 @@ I am an Android Developer myself and I always use scrcpy ❤ to test my work on - If you use the plugin's stop button to terminate an active scrcpy recording session with `mp4` extension, the `mp4` file is not playable. This is being caused by Java's `Process` not interrupting scrcpy session properly. Similar issue exists with `mkv` extension, although the `mkv` file can be played properly, it is not seekable.
Workaround: Close the scrcpy session with the window's close button +- [jadb](https://github.com/vidstige/jadb) throws an exception if any connected device becomes offline, hence devices list is not refreshed ## Roadmap - [ ] Provide better UI/UX @@ -52,7 +55,7 @@ I am an Android Developer myself and I always use scrcpy ❤ to test my work on ## Donate - This project would not have been possible without scrcpy (of course)! -- I've spent endless nights making this plugin work well! If you liked my work, consider donating me via [UPI (ID: `shripal17@okicici`, Shripal Jain)](https://kutt.it/shripal17UPI) (works only in India) or [PayPal +- I've spent endless nights making this plugin work well! If you liked my work, consider donating me via [UPI (ID: `shripal17@okicici`, Shripal Jain)](https://kutt.it/shripal17UPI) (works only in India, open link in smartphone) or [PayPal ](https://paypal.me/shripaul17) ## License diff --git a/screens/main.png b/screens/main.png index fd5240c..3ce80ce 100644 Binary files a/screens/main.png and b/screens/main.png differ diff --git a/screens/settings.png b/screens/settings.png index 1f38b83..4a640ec 100644 Binary files a/screens/settings.png and b/screens/settings.png differ diff --git a/screens/shortcuts.png b/screens/shortcuts.png index 115d064..fed8708 100644 Binary files a/screens/shortcuts.png and b/screens/shortcuts.png differ diff --git a/src/main/kotlin/com/codertainment/scrcpy/controller/util/SwingUtils.kt b/src/main/kotlin/com/codertainment/scrcpy/controller/util/SwingUtils.kt index 2ac69e0..df57a31 100644 --- a/src/main/kotlin/com/codertainment/scrcpy/controller/util/SwingUtils.kt +++ b/src/main/kotlin/com/codertainment/scrcpy/controller/util/SwingUtils.kt @@ -57,31 +57,55 @@ inline fun invokeLater(crossinline toRun: () -> Unit) { } } -const val SHORTCUTS = "| Action | Shortcut | Shortcut (macOS)\n" + - " | ------------------------------------------- |:----------------------------- |:-----------------------------\n" + - " | Switch fullscreen mode | `Ctrl`+`f` | `Cmd`+`f`\n" + - " | Rotate display left | `Ctrl`+`←` _(left)_ | `Cmd`+`←` _(left)_\n" + - " | Rotate display right | `Ctrl`+`→` _(right)_ | `Cmd`+`→` _(right)_\n" + - " | Resize window to 1:1 (pixel-perfect) | `Ctrl`+`g` | `Cmd`+`g`\n" + - " | Resize window to remove black borders | `Ctrl`+`x` \\| _Double-click¹_ | `Cmd`+`x` \\| _Double-click¹_\n" + - " | Click on `HOME` | `Ctrl`+`h` \\| _Middle-click_ | `Ctrl`+`h` \\| _Middle-click_\n" + - " | Click on `BACK` | `Ctrl`+`b` \\| _Right-click²_ | `Cmd`+`b` \\| _Right-click²_\n" + - " | Click on `APP_SWITCH` | `Ctrl`+`s` | `Cmd`+`s`\n" + - " | Click on `MENU` | `Ctrl`+`m` | `Ctrl`+`m`\n" + - " | Click on `VOLUME_UP` | `Ctrl`+`↑` _(up)_ | `Cmd`+`↑` _(up)_\n" + - " | Click on `VOLUME_DOWN` | `Ctrl`+`↓` _(down)_ | `Cmd`+`↓` _(down)_\n" + - " | Click on `POWER` | `Ctrl`+`p` | `Cmd`+`p`\n" + - " | Power on | _Right-click²_ | _Right-click²_\n" + - " | Turn device screen off (keep mirroring) | `Ctrl`+`o` | `Cmd`+`o`\n" + - " | Turn device screen on | `Ctrl`+`Shift`+`o` | `Cmd`+`Shift`+`o`\n" + - " | Rotate device screen | `Ctrl`+`r` | `Cmd`+`r`\n" + - " | Expand notification panel | `Ctrl`+`n` | `Cmd`+`n`\n" + - " | Collapse notification panel | `Ctrl`+`Shift`+`n` | `Cmd`+`Shift`+`n`\n" + - " | Copy device clipboard to computer | `Ctrl`+`c` | `Cmd`+`c`\n" + - " | Paste computer clipboard to device | `Ctrl`+`v` | `Cmd`+`v`\n" + - " | Copy computer clipboard to device and paste | `Ctrl`+`Shift`+`v` | `Cmd`+`Shift`+`v`\n" + - " | Enable/disable FPS counter (on stdout) | `Ctrl`+`i` | `Cmd`+`i`\n" + +const val SHORTCUTS = "In the following list, MOD is the shortcut modifier. By default, it's\n" + + "(left) Alt or (left) Super.\n" + + "\n" + + "It can be changed using `--shortcut-mod`. Possible keys are `lctrl`, `rctrl`,\n" + + "`lalt`, `ralt`, `lsuper` and `rsuper`. For example:\n" + + "\n" + + "```bash\n" + + "# use RCtrl for shortcuts\n" + + "scrcpy --shortcut-mod=rctrl\n" + + "\n" + + "# use either LCtrl+LAlt or LSuper for shortcuts\n" + + "scrcpy --shortcut-mod=lctrl+lalt,lsuper\n" + + "```\n" + + "\n" + + "_[Super] is typically the Windows or Cmd key._\n" + + "\n" + + "[Super]: https://en.wikipedia.org/wiki/Super_key_(keyboard_button)\n" + + "\n" + + " | Action | Shortcut\n" + + " | ------------------------------------------- |:-----------------------------\n" + + " | Switch fullscreen mode | MOD+f\n" + + " | Rotate display left | MOD+ _(left)_\n" + + " | Rotate display right | MOD+ _(right)_\n" + + " | Resize window to 1:1 (pixel-perfect) | MOD+g\n" + + " | Resize window to remove black borders | MOD+w \\| _Double-click¹_\n" + + " | Click on `HOME` | MOD+h \\| _Middle-click_\n" + + " | Click on `BACK` | MOD+b \\| _Right-click²_\n" + + " | Click on `APP_SWITCH` | MOD+s\n" + + " | Click on `MENU` (unlock screen) | MOD+m\n" + + " | Click on `VOLUME_UP` | MOD+ _(up)_\n" + + " | Click on `VOLUME_DOWN` | MOD+ _(down)_\n" + + " | Click on `POWER` | MOD+p\n" + + " | Power on | _Right-click²_\n" + + " | Turn device screen off (keep mirroring) | MOD+o\n" + + " | Turn device screen on | MOD+Shift+o\n" + + " | Rotate device screen | MOD+r\n" + + " | Expand notification panel | MOD+n\n" + + " | Collapse notification panel | MOD+Shift+n\n" + + " | Copy to clipboard³ | MOD+c\n" + + " | Cut to clipboard³ | MOD+x\n" + + " | Synchronize clipboards and paste³ | MOD+v\n" + + " | Inject computer clipboard text | MOD+Shift+v\n" + + " | Enable/disable FPS counter (on stdout) | MOD+i\n" + + " | Pinch-to-zoom | Ctrl+_click-and-move_\n" + "\n" + "_¹Double-click on black borders to remove them._ \n" + - "_²Right-click turns the screen on if it was off, presses BACK otherwise._\n" + + "_²Right-click turns the screen on if it was off, presses BACK otherwise._ \n" + + "_³Only on Android >= 7._\n" + + "\n" + + "All Ctrl+_key_ shortcuts are forwarded to the device, so they are\n" + + "handled by the active application.\n" + "\n" \ No newline at end of file