Which way locks? / Which way is locked?

This is in regards to every lock that turns 90-degrees. Meaning, not combination locks and unconventional locks. Let's just restrict it to:

  • Deadlocks
  • Door locks
  • The keyhole on the other side of a door lock
  • keyholes in general

I guess this is two questions:

  1. Which way is locked? Vertical or horizontal?
  2. Which way locks? Clockwise or counter-clockwise?

I've seen doorknobs have all sorts of configurations of this, so it never feels natural to lock or unlock someone else's door. The best thing for UX would be to have it be consistent across all locks. Are locks mostly consistent in these configurations or not?