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

Refer to --shortcut-mod above the Shortcuts: list #1681

Closed
1 task done
schokotets opened this issue Aug 16, 2020 · 4 comments
Closed
1 task done

Refer to --shortcut-mod above the Shortcuts: list #1681

schokotets opened this issue Aug 16, 2020 · 4 comments

Comments

@schokotets
Copy link

schokotets commented Aug 16, 2020

The problem
I first learned about available keyboard shortcuts when running scrcpy --help. At the top of the list "Shortcuts:", it says "...but it can be configured by --shortcut-mod." So in order to use the right alt key as a modifier, I tried

  • --shortcut-mod 'RightAlt'
  • --shortcut-mod 'Right Alt'
  • --shortcut-mod 'AltGr'

and because I was frustrated (none of these worked and I had no info which would, or so I thought), I went to the GitHub repo and stumbled upon the line further up in the help section, which of course clarified it for me. I didn't look further up in the help section because I didn't look up high enough in my terminal screen.

A solution I'd like

  • A simple referral in the ---help text and man page, so it says "...but it can be configured by --shortcut-mod (see above)."
  • A list of available shortcuts when running the command, as the current error messages WARN: Unknown modifier key: altgr and ERROR: Invalid modifier keys: altgr are barely useful.

I hope that this small frustration can be resolved for users like me. I would work on a pull request myself, unless somebody else is up to it.

@Helaer
Copy link

Helaer commented Aug 16, 2020

The input parameter is wrong, it should be: scrcpy --shortcut-mod =ralt, by default it is lalt.

@schokotets
Copy link
Author

Yup, I eventually found out it would be ralt, but this is not what my issue is about. It's about communicating it better to a first-time user.

rom1v added a commit that referenced this issue Aug 16, 2020
@rom1v
Copy link
Collaborator

rom1v commented Aug 16, 2020

👍

A simple referral in the --help text and man page, so it says "...but it can be configured by --shortcut-mod (see above)."

6cc22e1

A list of available shortcuts when running the command, as the current error messages WARN: Unknown modifier key: altgr and ERROR: Invalid modifier keys: altgr are barely useful.

d02789c

$ scrcpy --shortcut-mod=rctrl+abc,lctrl
ERROR: Unknown modifier key: abc (must be one of: lctrl, rctrl, lalt, ralt, lsuper, rsuper)
ERROR: Invalid modifier keys: rctrl+abc

Please review, if it's ok I'll merge them.

I would work on a pull request myself

Oh, sorry, I saw this after I already wrote the commits 😕

@schokotets
Copy link
Author

No worries, I sincerely appreciate how quickly you got back to me!
Actually, you have a better solution to the second problem than the one I implemented: I thought it would be best to refer to the help section, as it als specifies the ability to have multiple modifier keys, and I was afraid to duplicate information between code and the help section.
However, seeing your solution as being way more straight-forward and user-friendly, I'm glad you put in the work ^^

So yes, LGTM! Thanks for checking back.

@rom1v rom1v closed this as completed in 6cc22e1 Aug 19, 2020
jellopuddingstick added a commit to jellopuddingstick/scrcpy that referenced this issue Jan 23, 2021
scrcpy v1.17

Changes since v1.16:
 - Fix errors on Android 11 (Genymobile#1468)
 - Add --encoder option (Genymobile#1810, Genymobile#1827)
 - Add --forward-all-clicks option (Genymobile#1302, Genymobile#1613)
 - Add --legacy-paste option (Genymobile#1750, Genymobile#1771)
 - Workaround screen off/on issue on exit (Genymobile#1670)
 - Rework console/noconsole versions on Windows (Genymobile#1875, Genymobile#1988)
 - Terminate server properly without killing it on close (Genymobile#1992)
 - List available shortcut keys on error (Genymobile#1681)
 - Upgrade platform-tools to 30.0.5 (adb) in Windows releases
 - Upgrade SDL to 2.0.14 in Windows releases
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

No branches or pull requests

3 participants