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

Options
2»

Comments

  • spacesuitdiver
    spacesuitdiver
    Community Member
    edited April 2020
    Options

    I couldn't get the solution by @JamesD above working so my colleague suggested an app called Karabiner Elements. It's a different approach in that it only remaps ⌘-\ to ⌘-⇧-\ for browsers and otherwise leaves ⌘-\ intact instead of the approach above which remaps ⌘-\ everywhere. 1.5 hours of wasted time later I ended up with this rule, there's a way to publish it to Karabiner's complex modifications but I need to get some work done, if anyone wants to give that a try it'd make things a few clicks away from helping others instead of modifying a bunch of files.

    ~/.config/karabiner/karabiner.json (rules array):

    {
      "description": "1Password browser remap from cmd-\\ to cmd-shift-\\",
      "manipulators": [
        {
          "conditions": [
            {
              "bundle_identifiers": [
                "^com.apple.Safari",
                "^com.google.Chrome",
                "^org.mozilla.firefox"
              ],
              "type": "frontmost_application_if"
            }
          ],
          "from": {
            "key_code": "backslash",
            "modifiers": {
              "mandatory": [
                "left_gui"
              ]
            }
          },
          "to": [
            {
              "key_code": "backslash",
              "modifiers": [
                "left_shift",
                "left_gui"
              ]
            }
          ],
          "type": "basic"
        }
      ]
    }
    
  • spacesuitdiver
    spacesuitdiver
    Community Member
    edited April 2020
    Options

    (not sure what happened to my first composed comment)

    After attempting to get @JamesD's solution working and being unsuccessful one of my colleagues suggested trying Karabiner Elements instead. This takes a different approach in that it remaps cmd-\ to cmd-shift-\ only in browsers instead of everywhere. You'd add the following rule to the rules array of your karabiner config.

    ~/.config/karabiner/karabiner.json (rules array):

    {
      "description": "1Password browser remap from cmd-\\ to cmd-shift-\\",
      "manipulators": [
        {
          "conditions": [
            {
              "bundle_identifiers": [
                "^com.apple.Safari",
                "^com.google.Chrome",
                "^org.mozilla.firefox"
              ],
              "type": "frontmost_application_if"
            }
          ],
          "from": {
            "key_code": "backslash",
            "modifiers": {
              "mandatory": [
                "left_gui"
              ]
            }
          },
          "to": [
            {
              "key_code": "backslash",
              "modifiers": [
                "left_shift",
                "left_gui"
              ]
            }
          ],
          "type": "basic"
        }
      ]
    }
    
  • Ben
    Options

    (not sure what happened to my first composed comment)

    Sorry about that - looks like the forum flagged it as spam. I've unflagged it. Glad to hear you found a solution that works for you. :)

    Ben

  • marshallbu
    marshallbu
    Community Member
    Options

    @spacesuitdiver Hammerspoon never really worked for me, and I ended up changing the global shortcut on my work laptop, intolerable using IDEs with this common shortcut. Thanks for this solution, going to give it a go and see if it can be extended to other applications.

  • Ben
    Options

    :+1: :)

    Ben

  • camjackson
    camjackson
    Community Member
    Options

    Just wanted to add another voice to the chorus here. I've been happily using 1Password and Atom alongside each other for years, and upgrading to 1Password 7 has completely broken Atom now :( This feels like kind of a big deal given how popular both Atom and 1Password are among developers!

    I've read all the comments from 1Password folks and I really empathise with the challenge y'all have with trying to design an app to work globally across an entire operating system, for all different sorts of users. From my perspective though, it really feels like 1Password is hijacking my computer in a way that it never used to. It feels really intrusive.

    Again I understand that we're probably not the norm - the vast majority of users are probably unlikely to need cmd + \ for anything else, so I can see why the new behaviour has become the default. But it would be fantastic if there were an extra setting to get the old behaviour back so that cmd + \ only activates 1Password when I'm in my browser, and from anywhere else it's cmd + opt + \.

    If that's not going to happen, then I guess my fallback option is to re-map "Fill Login or Show 1Password" to cmd + opt + \. For future readers, note that in order to be able to set that, you first have to unset that key combination from "Show 1Password", otherwise when you try to enter the new hotkey for "Fill or Show" then 1Password will hijack focus from itself, which is kind of hilarious :lol:

  • ag_ana
    ag_ana
    1Password Alumni
    Options

    Thank you for your feedback on this as well @camjackson!

    If that's not going to happen, then I guess my fallback option is to re-map "Fill Login or Show 1Password" to cmd + opt + .

    I think for now this would indeed be the best option in your scenario.

  • sierug
    sierug
    Community Member
    Options

    @kpclements his idea (Keyboard Maestro) helped me skip this problem.

    Here is my setup.

  • Ben
    Options

    Thanks for sharing, @sierug. 😀

    Ben

This discussion has been closed.