The default keybindings in WoW has CTRL + <number> bound to your pet bar. So CTRL+1 will attack, CTRL+2 will follow etc. If you didn't re-bind those keys you can just use those to have the pet attack or follow. Personally I still use CTRL+1 for pet attack but I remapped it to a macro where I do some other stuff as well.