macOS has an annoying bug where bluetooth periodically stops working. If you're working via a BT keyboard/trackpad you are forced to wait a minute or two until it resolves on it's own.
Alternative (5 seconds): Have a cable at the ready, plugin your trackpad, restart BT via the macOS Dock.
brew install blueutil
echo "blueutil -p 0 && sleep 1 && blueutil -p 1" > btfix.command && chmod +x btfix.command && open .
- Select the .command file > right click > Get info (or CMD+I)
- Drag an icon file onto the existing icon in top left
- Change .command to .app temporarily (icon disappears but it will come back)
- Drag to Dock
- Change .app extension back to .command