You've got a complicated problem. I can only imagine that by "keyhole", you've got what's called a mortise lock. That is to say, there is a large, rectangular assembly that incorporates both the latch mechanism, and the lock mechanism. The "square shafts" you refer to are called spindles, and it sounds like they need to be replaced. A good locksmith should be able to help. You'll probably need to shop this around, so be patient. Try to remove the entire mortise assembly by unscrewing it from the door's edge. You'll also need to remove the knobs and spindle and any screws through the faces of the door to free the mortise lock and slide it out. Take this whole assembly, along with your new knobs, to a locksmith and see if he has spindles of the appropriate length that will fit both the mortise lock and the knobs. There are adapter sleeves if the proper spindle for the mortise lock is smaller than what the knobs require. If it's larger, well, hope it's not larger. Try this on ONE DOOR ONLY to see if it's possible. Good Luck.