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

[Shortcuts]: On macOS you can't create shortcuts with the Command key #30218

Closed
fallaciousreasoning opened this issue May 9, 2023 · 2 comments · Fixed by brave/brave-core#18417

Comments

@fallaciousreasoning
Copy link

This is because the key is sent to the backend as Meta but the backend only knows how to parse Command

@stephendonner
Copy link

stephendonner commented Jun 5, 2023

Verification PASSED using

Brave 1.53.81 Chromium: 114.0.5735.90 (Official Build) beta (x86_64)
Revision 386bc09e8f4f2e025eddae123f36f6263096ae49-refs/branch-heads/5735@{#1052}
OS macOS Version 11.7.7 (Build 20G1345)

Steps:

  1. installed 1.53.81
  2. launched Brave
  3. opened brave://flags
  4. set brave://flags/#brave-commands to Enabled
  5. clicked Relaunch
  6. loaded brave://settings/system
  7. clicked on Shortcuts (brave://settings/system/shortcuts)
  8. deleted the binding for Focus Location
  9. deleted the binding for New Tab
  10. clicked on Add next to New Tab
  11. pressed command + L
  12. clicked Save
  13. confirmed New Tab shows Command L
  14. pressed Command + L
  15. confirmed it opened a new-tab window
  16. while I was here, confirmed I could reset both New Tab and Focus Location bindings
example example example example example example example
Screen Shot 2023-06-05 at 2 46 19 PM Screen Shot 2023-06-05 at 3 12 53 PM Screen Shot 2023-06-05 at 3 17 01 PM Screen Shot 2023-06-05 at 3 18 22 PM Screen Shot 2023-06-05 at 3 07 14 PM Screen Shot 2023-06-05 at 3 18 22 PM Screen Shot 2023-06-05 at 3 22 31 PM

@fallaciousreasoning
Copy link
Author

Note: JavaScript sometimes requires other keys to be pressed to register Meta key presses. For example, if I just press the Meta key on Linux, the shortcuts UI doesn't get any input which is a bit weird to me. I get the same results in https://css-tricks.com/snippets/javascript/javascript-keycodes/

If this turns out to be a big problem, we can add a special mojom interface, just for this and not use the existing JS key handlers.

@stephendonner stephendonner added QA Pass-macOS and removed QA/In-Progress Indicates that QA is currently in progress for that particular issue labels Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants