Keyboard shortcut to generate and paste new password (workaround)
I've always wanted a way to generate and fill in a new password in a form using a keyboard shortcut and was surprised that no such shortcut exists in 1Password (mini). It turns out I'm not the only one:
- 27733/feature-request-password-generator-shortcut
- 24215/keyboard-shortcuts
- 1809/shortcut-for-new-passwords
- 21033/request-keyboard-shortcut-for-fill-button-in-1p-mini-password-generator
- 18748/req-keyboard-access-to-pasword-generator-item
- 21373/feature-request-a-keyboard-shortcut-system-service-for-password-generator
- 14573/keyboard-shortcut-for-password-generator-on-our-list
- 14723/1password-mini-more-keyboard-shortcuts
- 13809/mini-preferences-keyboard-shortcut
- 14960/1password-mini-keyboard-shortcuts
- 15321/keyboard-shortcuts-for-1password-mini
- 15466/feature-request-1password-mini-keyboard-shortcuts
(etc.)
Given that dozens of people have been requesting this feature for over a year to no avail, it's perplexing that Agilebits apparently has no intention of following through on this request. So, here's a workaround I came up with using Automator and system services.
- Open Automator
- Choose the "Service" type for your new document.
- In the search box for the Actions library, type "applescript".
- "Run Applescript" should be one of the search results. Drag that item to the workflow area on the right.
- Delete
(* Your script goes here *)
and paste in the code from this gist. - Above the workflow editor, change the first drop down for "Service receives" to "no "input" and check "Output replaces selected text".
- Save the workflow with the name "Generate password". Here's a screenshot of how it should look when completed:
- Open System Preferences > Keyboard > Shortcuts tab
- Select the "Services" category on the left.
- Under the "General" dropdown on the right, you should see your "Generate password" service listed.
- Check the box for that item and give it a keyboard shortcut. Screenshot:
- Within text inputs in any application, the keyboard shortcut will generate and paste a new password.
You can tweak the character pool and password length in the gist to your liking.
Comments
-
Wow, I admire your persistence! Gonna try this. I agree that it's baffling that Agile would allow so much keyboard navigation only to stop short one step before the destination, namely being able to !(&@# paste a freakin generated password... nope gotta go get the mouse, like an animal.
0 -
Hi guys,
Thanks for letting us know you've been waiting for this. I know how you feel, I've asked for this a while ago for myself as well, and this is still one of the most popular requests we get. I've added both of your feelings to our tracker on this.
Given that dozens of people have been requesting this feature for over a year to no avail, it's perplexing that Agilebits apparently has no intention of following through on this request.
We never said that we won't do this. It is still an open major improvement request in our tracker and we want to do this in the future. However, we have to prioritize certain things given our limited resources and that means it takes some time.
Be careful with using the script offered here, any password you generate will not be automatically saved in 1Password, it will not be cleared automatically in the clipboard and it is not as flexible as 1Password's generator options like length, symbols, and/or separators since you have to manually edit it each time to fit the requirements.
0 -
In the ~15 years of using a couple of Macs I've never gotten around to using AppleScripts or Automator. So i did everything here ... but now what? How do I activate it?
0 -
Hi @TriAthDance. Did you assign a keyboard shortcut to the script as instructed in step 11, as well as checking the box? If you did that then the shortcut assigned to it should be all you need to use to run the script.
Please note MikeT's response though as to some of the limitations of using it compared to the built-in version. We wouldn't want anybody losing a password by accident for whatever reason.
0