1

I use the keyboard shortcut CommandOptionL to lock my machine. For the most part this works, but not if Chrome is in focus. In Chrome, when I use that combination, it opens the "Downloads" page in a tab. I have tried everything I can think of to prevent this.

There is a menu item for "Downloads": Window -> Downloads. I have used the System Preferences -> Keyboard -> Shortcuts -> App Shortcuts to attempt to set it to something else, but it doesn't seem to matter, I can add a new shortcut for Downloads, but no matter what I do CommandOptionL still opens Downloads. The only difference is the shortcut I configure highlights "Window" in the menu bar momentarily, while CommandOptionL does not. Although it does highlight if I set the shortcut to CommandOptionL.

I have even gone so far as to set defaults write com.google.Chrome NSUserKeyEquivalents -dict-add 'Downloads' '\0'.

When I read:

defaults read com.google.Chrome NSUserKeyEquivalents
{
    Downloads = "";
}

and yet CommandOptionL still opens the Downloads page.

Global keyboard shortcuts in macOS have always been frustrating, but it was possible to override each conflicting app, but this one is driving me crazy.

EDIT: I also went through the chrome extensions and no keyboard shortcut was set to CommandOptionL. I also tried disabling all extensions; it did not work.

  • Just wonderin'... Have you tried to just CHANGE the Chrome downloads shortcut to something truly obscure? (shift - command - F12 or the like) I have had success with that method, tho I never tried it with Chrome. – Steve Chambers Oct 2 '18 at 19:33
  • @SteveChambers how do you do that ? try it as answer. – Ruskes Oct 2 '18 at 22:21
  • if I remember correctly you define the keyboard shortcut in keyboard prefs for Chrome as it is in the app, verify it still works and then change it. That is how I have done it before. – Steve Chambers Oct 2 '18 at 23:43
3

There is already a system wide keyboard shortcut to lock your display. It's CommandControlQ for High Sierra and higher and ControlShift on other systems, to let your display go to sleep (which is effectively the same when password protected).

With this keyboard shortcuts in mind you can be sure, that they don't interfere with any application.

Note that on newer MacsBook Pros with Touch ID only the first keyboard shortcut works.

  • Yes! As an alternative, I would just change the original shortcut for locking. If the mountain won't come to Muhammad... – Mateus Ribeiro Oct 3 '18 at 0:56
  • FWIW - I haven't been able to re-map ⌘⌃Q to anything else using the built-in system, so I used Keyboard Maestro to map my own shortcut instead. It works in all apps because Keyboard Maestro gets the shortcut before the app does. – TJ Luoma Oct 3 '18 at 6:04
0

As you know the shortcuts are tied up with the application, while Apple also has they sometimes overriding shortcuts.

For example the CMD+Q works in almost all apps. Apple or non Apple.

If the Chrome is your top window it will use Chrome shortcut for Option+Cmd+L (not Apple), or yours.

Chrome lets you add or modify some shortcuts but not all.

The only way to do that would be to modify the Chrome Plist, which I do not recommend.

-1

CommandOptionL is a system shortcut defined by Apple that (as you've found out) opens the ~/Downloads folder.

Apple mandates that App Developers respect those shortcuts.

Respect standard keyboard shortcuts and create app-specific shortcuts for frequently used commands. Keyboard shortcuts let people activate menu items and actions by pressing specific key combination.

Why Chrome devs chose to hard wire in CommandOptionL as opening the downloads location is something only they can answer. (IMO) The downloads folder configured in Chrome can be entirely different from the system's ~/Downloads folder. Doing a simple test, I changed my download location in Chrome to my Desktop and pressing CommandOptionL opened my Desktop folder (as expected).

So, the Chrome devs decided to re-map a system shortcut which is something Apple frowns upon:

In general, don’t override standard keyboard shortcuts. Users may become confused if the shortcuts they know work differently in your app. Only in very rare cases does it make sense to redefine a common shortcut. For example, if people spend a significant amount of time in your app, it might make sense to redefine a standard shortcut that isn’t applicable to your app. Another option might be to let the user choose their own keyboard shortcuts.

So, the problem is with Chrome and not with macOS. That said, there's no "lock" (like in Windows). I don't recommend attempting to re-map keyboard shortcuts to mimic their Windows counterpart (WindowsL, in this case). With a small amount of practice, you can easily switch between both systems.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .