How?

Too many ways:

  • create a isSitting boolean flag and only allow the input pass a Branch node when the flag is false
  • set player Walk Speed to 0 and disable jumping
  • use Input Mapping Contexts; a regular one, and one for sitting chair:

Reverse it when standing up.