They also use a similar mechanism for the "get me out of here ASAP" panic button [0] that staff place in your hand and tell you to squeeze if required, all it does is detect a change in air pressure on the other end of the tubing.
[0] https://www.mriequip.com/store/pc/MRI-Non-Magnetic-Magnalarm...