subdavis / Tusk

🐘 🔒 KeePass-compatible browser extension for filling passwords.
https://subdavis.com/Tusk
Other
479 stars 74 forks source link

Adding more keyboard navigation shortcuts. #173

Closed zmilonas closed 6 years ago

zmilonas commented 6 years ago

Adding password copy and username copy as well as up arrow list navigation.

The only problem with Ctrl+B is that it opens the bookmarks in Firefox.

Would also be usable to write tests for keyboard navigation.

Fixes #161 #159

subdavis commented 6 years ago

I think these should also be implemented on the entry details page, if they are going to be added.

It would also be good to add a key for copying the OTP token if it exists.

If you would like me to make those chances, please lmk.

Thanks for you for the contribution!

zmilonas commented 6 years ago

Ok thank you :) What should we do about Cmd-B being a bookmark shortcut in Firefox? Do you have a suggestion for a better shortcut?

subdavis commented 6 years ago

I think all you need to do is event.preventDefault() after handling cmd+b

This should stop propagation on the key event and Firefox won't handle it.

zmilonas commented 6 years ago

I actually tried both this and event.stopPropagation() and they seem not to have any effect. :/

I think this shortcut is wired on a different level than JavaScript in the browser itself

zmilonas commented 6 years ago

I can't actually find good 2 key shortcuts for firefox and with your suggestions there are 3 shortcuts to be made:

subdavis commented 6 years ago

Forget firefox for now. That's definitely a bug, or a very stupid feature. Go with ctrl+c for password, ctrl+b for username (so chrome users can have it) and don't worry about OTP yet. I'd like to get this merged soonish.