How to apply a "lock all" function to session_state?

The value doesn’t change when you type but when you either press Enter or take the focus away from the widget. The callback is triggered not because you interact with the checkbox but because the text input losses the focus. AFAIK there is no way (within the streamlit framework) to discriminate beetween pressing Enter and losing the focus.

It looks like what you actually want is to detect a keystroke. That is low-level functionality that Streamlit doesn’t offer. Why do you need that?