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...