I prefer to give it at least 3 weeks (actually, I prefer 4, but that's not entirely necessary), but you'll probably be OK with two. One might be pushing it. Take a gravity sample and see if it's done fermenting. If it's at your target FG, give it a couple days and check again. If it hasn't changed in that time, you're fine to keg.
The most sure way to know is by testing with a hydrometer, and then test again in 3 days. If the hydrometer has not changed, then fermentation is done and you can transfer to the keg.
Another way is to let it sit in the primary for 3-4 weeks. It will definitely be done by then.