A scissor switch uses a pair of interlocking plastic “scissor” arms under each key.
These arms:
Keep the key stable,
Guide it straight up and down,
Sit on top of a rubber dome that registers the keypress,
When you press a key, the scissor mechanism collapses neatly and snaps back when released.