1Password ⌘ \ shortcut active in other apps [intentional, but can be modified using 3rd party tool]

Options
Pahitos
Pahitos
Community Member
edited June 2018 in Mac

AgileBits Update: JamesD offered a cool hack to enable the behaviour some people want:

1Password ⌘ \ shortcut active in other apps [intentional, but can be modified using 3rd party tool]


The latest version of 1Password on the Mac introduced a feature that watches what apps you're using and lets you open 1Password Mini from the menu bar/on command+/. Unfortunately, it interferes with some of the shortcuts in other apps, in particular, the most critical one, is Xcode, it prevents me from commenting out the lines. For now, quitting 1Password works, but that's obviously a terrible "fix".
Is there a way to ignore certain apps? Or how can I disable that feature entirely? If neither of these solutions exist, can I downgrade to the previous version?

Thanks.


1Password Version: 7.0
Extension Version: Not Provided
OS Version: 10.13.4
Sync Type: Not Provided

ref: KBH-35424-738

«1

Comments

  • 1feek
    1feek
    Community Member
    Options

    Thats why I use for a long time CMD+\ as shortcut

  • Pahitos
    Pahitos
    Community Member
    Options

    Yeah, that's fair. Though I still think that having to change your shortcuts (or quitting certain apps) is not a great solution to this problem.

  • rportugal
    rportugal
    Community Member
    Options

    The default CMD+\ clashes with Visual Studio Code.

  • AGAlumB
    AGAlumB
    1Password Alumni
    edited May 2018
    Options

    Indeed, sorry for the confusion. Since 1Password can match apps to show you relevant logins even when it cannot fill there (e.g. iTunes), the login keyboard shortcut is global. You can, however, change this to whatever you want in 1Password Preferences > General. Cheers! :)

    ref: apple-1411

  • kylegach
    kylegach
    Community Member
    edited May 2018
    Options

    I’ve been using ⌘-\ to trigger 1Password for years. The same is true for apps that also use that shortcut, e.g. Atom uses it to toggle the tree view. I doubt I’m alone in either of those. I’d much prefer a way to exclude apps from the global shortcut than having to change the 1Password shortcut and have to re-train my muscle memory. Any chance of such a feature?

    Alternatively, is there a way to define different shortcuts for the browser extension(s) than the global one used by 1Password Mini?

  • Jacob
    Options

    Thanks @kylegach! I'll let the team know you're looking for this as well. It isn't available in 1Password right now.

  • Jacob
    Options

    @kylegach Also, to answer your second question:

    Alternatively, is there a way to define different shortcuts for the browser extension(s) than the global one used by 1Password Mini?

    Yes, you can change this in 1Password > Preferences under General. It's the "Fill Login or Show 1Password" shortcut. :)

  • JamesD
    JamesD
    Community Member
    Options

    I use this shortcut in both the browser and Visual Studio Code all the time. My muscle memory has been tripping me up a lot the past few days.

    A workaround might be to use Hammerspoon. It's an open source tool that lets you script just about everything in MacOS. I'd recommend setting the global 1Password shortcut to a keybinding you never use, then catching CMD+\ with Hammerspoon and using hs.eventtap.keyStroke to emit the new 1Password shortcut if Visual Studio Code isn't the active window. I'll play around with it and post a script here if I come up with something useful.

  • AGAlumB
    AGAlumB
    1Password Alumni
    Options

    That's really interesting. Please do let us know! :)

  • JamesD
    JamesD
    Community Member
    Options

    Here's what I came up with. It Works On My Machine (TM).

    1. Install Hammerspoon and follow the setup guide.

    2. In 1Password options, set Fill Login or Show 1Password to CMD+F12. I forget if that's the one set to CMD+\ by default? I cleared the Show 1Password shortcut.

    3. In Visual Studio Code, edit keyboard shortcuts and set Toggle Side Bar Visibility to CMD+F11. This is because Hammerspoon seems to have problems generating a backslash keystroke.

    4. Edit ~/.hammerspoon/init.lua and add the following:

    -- Use Cmd+\ to show 1Password everywhere except Visual Studio Code
    function activate_1password()
      local client = hs.application.frontmostApplication()
      if client:title() == 'Code' then
        hs.eventtap.keyStroke({"cmd"}, "f11")
      else
        hs.eventtap.keyStroke({"cmd"}, "f12")
      end
    end
    hs.hotkey.bind({"cmd"}, "\\", activate_1password)
    

    Enjoy!

  • AGAlumB
    AGAlumB
    1Password Alumni
    Options

    @JamesD: Thanks so much for sharing that! I bet others will find it useful as well. :chuffed:

  • kpclements
    kpclements
    Community Member
    Options

    Thanks for this @JamesD, but I must say I find it a bit odd that we have to resort to this kind of work around. I'm sticking with v6 for now.

  • AGAlumB
    AGAlumB
    1Password Alumni
    edited June 2018
    Options
  • mcrawford
    mcrawford
    Community Member
    Options

    I just hit this with Atom and found this post. I don't think it's right to introduce a new shortcut - intercepting this same shortcut in prior use by existing apps - without warning. It should instead be something you "opt-in" to using, when there's no conflict.

  • Lars
    Lars
    1Password Alumni
    edited June 2018
    Options

    Welcome to the forum, @mcrawford! Thanks for sharing your thoughts with us on the topic of the new global shortcut for ⌘\ . :)

  • jackocnr
    jackocnr
    Community Member
    Options

    Hi @Jacob, thanks for your responses earlier, but in your second post I think you may have misunderstood the question. When kylegach asked:

    Alternatively, is there a way to define different shortcuts for the browser extension(s) than the global one used by 1Password Mini?

    And you replied

    Yes, you can change this in 1Password > Preferences under General. It's the "Fill Login or Show 1Password" shortcut. :)

    I believe your answer is in reference to the main 1password mac app, but I believe he was asking if there was a way to set a different hotkey for the 1password Chrome extension specifically. Then we can disable/change the global 1password mac app shortcut, and our other app shortcuts will work fine again.

    I've looked and I don't think your Chrome extension has any settings at all, and I've seen other Chrome extensions that have keyboard shortcut settings, so I'd like to request that feature please!

    Secondly, I think I've found a bug with the main 1password mac app, in the keyboard shortcuts settings. Firstly I see that the "Show 1password" shortcut is set to Cmd+Option+\ so I unset that, then I try to change the "Fill Login" shortcut to that same shortcut: Cmd+Option+\ and I get an error saying "The key combination Command+C can't be used". Can you reproduce that?

    Thanks for your help.

  • AGAlumB
    AGAlumB
    1Password Alumni
    Options

    I believe your answer is in reference to the main 1password mac app, but I believe he was asking if there was a way to set a different hotkey for the 1password Chrome extension specifically. Then we can disable/change the global 1password mac app shortcut, and our other app shortcuts will work fine again. I've looked and I don't think your Chrome extension has any settings at all, and I've seen other Chrome extensions that have keyboard shortcut settings, so I'd like to request that feature please!

    @jackocnr: There is no keyboard shortcut specific to the browser extension because the browser extension does nothing but allow the 1Password app to interact with it. When you use the keyboard shortcut (or toolbar button), everything you see and everything that happens is done by the native 1Password app. So there are no settings specific to the extension, as it cannot function on its own.

    Secondly, I think I've found a bug with the main 1password mac app, in the keyboard shortcuts settings. Firstly I see that the "Show 1password" shortcut is set to Cmd+Option+\ so I unset that, then I try to change the "Fill Login" shortcut to that same shortcut: Cmd+Option+\ and I get an error saying "The key combination Command+C can't be used". Can you reproduce that?

    I can't reproduce that. It sounds like you're either pressing ⌘ C, which is reserved for Copy already, or something else on your system is. I'm not getting an error here.

  • marshallbu
    marshallbu
    Community Member
    Options

    @JamesD thank you so much for this, Hammerspoon is exactly what I need!! Managing different shortcuts for different workstation environments was driving me insane. You are the real MVP.

  • AGAlumB
    AGAlumB
    1Password Alumni
    Options

    Indeed, cool tip from JamesD. :)

  • soffes
    soffes
    Community Member
    Options

    I'd also really love to be able to disable this outside of browsers. Very used to command-\ and would love to keep that but also not have it offer to fill password in Xcode.

  • Lars
    Lars
    1Password Alumni
    Options

    @soffes - we don't have any official mechanism within 1Password itself to accomplish what you're asking for, and we aren't likely to be adding one, as it's been the default behavior of 1Password -- and probably the most-popular and well-known of our keyboard shortcuts from the beginning. That said JamesD did provide a cool hack to accomplish what I think you're seeking. Obviously, this isn't an official 1Password solution, but as James says, it "Works On My Machine." :)

  • spacesuitdiver
    spacesuitdiver
    Community Member
    edited March 2020
    Options

    I honestly feel this is a security issue. If I invite a colleague to code a bit with me and I let them use VS Code they now have full access to my 1 Password if they happen to know the trigger and happen to be within the lock threshold? I would also suspect the majority of users expect it to work only in the browser anyway so why this is defaulted to a global by default seems odd.

  • Lars
    Lars
    1Password Alumni
    Options

    Welcome to the forum, @spacesuitdiver! Thanks for the feedback.

  • timdmackey
    timdmackey
    Community Member
    Options

    This is really frustrating, I've been using 1Password for years and have the ⌘\ shortcut burnt into my memory. I just switched over to 1Password 7 and now I'm having the same conflict in Visual Studio Code as others have mentioned. What's the logic for making this shortcut global now? There's already a separate shortcut for "Show 1Password", I don't need the Fill Login shortcut to attempt to log in to every single unsupported application on my computer. Making this particular shortcut global seems to serve no purpose aside from screwing up our workflows.

  • ag_ana
    ag_ana
    1Password Alumni
    Options

    @timdmackey:

    Thank you for sharing your feedback with us!

    What's the logic for making this shortcut global now?

    My colleague brenty wrote this in his post above, but I am quoting it here again for you convenience: "Since 1Password can match apps to show you relevant logins even when it cannot fill there (e.g. iTunes), the login keyboard shortcut is global.

    Sorry to hear that this is frustrating for you, but we appreciate you taking the time to share your thoughts with us :+1:

  • MaxDesign
    MaxDesign
    Community Member
    edited April 2020
    Options

    Hi,
    I'm a designer and the cmd + \ shortcut also interferes with my workflow (in my design tool).

    On another thread @kpclements mentioned that TextExpander was having this option.
    I can add that Spectacle also has this.

    I have read a couple of threads on the same topic with very good points brought by the community. Are you guys monitoring the popularity of this request?

  • kpclements
    kpclements
    Community Member
    Options

    I don't think the 1Password programmers think it's much of an issue. At least that was the take away I have from many discussions. What I have done instead is turned off the keystroke in 1Password and use Keyboard Maestro to call it up. Solved my issue, although it would be nice to have a switch in 1password that would allow you to pick and choose.

  • Ben
    Options

    Hi folks,

    We don't currently have anything in the works that would address this differently, but it is possible to customize 1Password's shortcuts if desired:

    1Password > Preferences > General > Keyboard shortcuts

    Additionally we do track the feedback that we receive and if this becomes a popular request we may be able to further investigate spending more development time here.

    Ben

  • spacesuitdiver
    spacesuitdiver
    Community Member
    Options

    @Ben I'm sure you can relate tot he fact that the default shortcut is usually what is engrained in our brain and it's a hassle to reconfigure the shortcuts every time we wipe our machines (granted maybe they are backed up) so changing the shortcut is less than ideal here.

  • Ben
    Options

    I understand, however, even if we decided today to do something differently about this it would be months before it would be available. As such I'd recommend basing your workflow on what is currently available.

    Ben

This discussion has been closed.