I usually have my rax on one key, factory on another, and starport on a third. Alternatively, you can have all three on one hotkey and use tab to change between them.
A good tip is having the 'support' buildings (techlab, engineering bay, armory) in the same controlgroup, so when you hit your Barracks hotkey, you can see whether or not your engineering bay upgrades are done.