This can be their only function depending on the lock. On (some) modern double glazing locks pulling up on the handle throws additional hooks - pulling down again releases the hooks unless the key has been turned to lock it
I believe so on many locks
It depends on the lock/locking mechanism but it can work the way you want with the right selection of lock