I've trapped myself outside my Mac. Help
I'm saved!
Simple solution to this awful catch-22 on Macs: If you have another computer, use Teleport to get control on the looped computer.
Three cons: 1) You have to have a second computer. 2) You have to have Teleport installed on both of them. 3) Teleport must be running on both of them while you're looped. Otherwise you won't get it started.
You can use the defaults command to remove your changes to default behaviour. defaults find mouse
will, hopefully, list the relevant change, among others, then default delete com.apple.
whatever (say) will delete a particular instance.
I've no idea how you got into this trouble: how did you configure this damned behaviour?