TLDR
You can stop your YubiKey from
typinginabunchofletters[CRLF]
by running a command. This stops you from accidentally sending your OTP to Slack / etc when you accidentally tap it
Stop this now.
To avoid accidental triggering of the YubiKey you could…
Change the OTP trigger to “long touch”
Easy enough, just open the YubiKey Manager, go to [Applications] → [OTP] and hit [Swap]!
Not use the YubiKey
:) Joking
But in all seriousness I did see that someone had released a tool-tray
application for Mac to disable the YubiKey when you don’t need it.
Looks like you could potentially even use it as an access card!
Disable the Enter key from being pressed
The (discontinued) YubiKey Personalization Tool doesn’t support the later YubiKeys (i.e. 5C Nano). But supposedly the new YubiKey Manager can do it - though it doesn’t seem that you are able to find a setting to disable the sending of the Enter keycode.
At least you can change the OTP password to only be generated on a long touch.
CLI to the rescue
You can download the ykpersonalize
tool from YubiKey’s website. But I would recommend you to just fire up your terminal and install it through homebrew.
Firstly you avoid this mess of security issues
Also the version available on homebrew is newer…
Installation
To install, open up your terminal and type brew install ykpers
If you get some “command not found” error, do these instructions first: Homebrew
You might need to restart your terminal after installing Homebrew!
Now you can run ykpersonalize -u -1 -o -append-cr
and let it do its magic 🪄
Or, if you are using Slot 2 (i.e. Long Touch), run ykpersonalize -u -2 -o -append-cr
instead