Provide better interface to key locking.