Misbehaving spacebar
When I press the spacebar on my Mac Book Pro, the cursor does not move, and sometimes creates a yellow box around the page in the Pages app. It freezes across other apps too. Occasionally it jumps to some other place in the app.
Sometimes the screen changes by itself every ten minutes even though I do not swipe the pad.
Please help.
MacBook Pro 16″, macOS 12.2