Move the pointer with your keyboard, or turn Mouse Keys off
Quick answer
Turn Mouse Keys on or off in System Settings > Accessibility > Pointer Control, under Alternate Control Methods. For a quick switch, press Option-Command-F5 and choose Mouse Keys.
Why it happens
Mouse Keys is an accessibility feature that turns some keys into pointer controls, for people who find a mouse or trackpad hard to use. When it's on by mistake, the pointer jumps when you type numbers and some letters stop typing. It's often switched on by accident by pressing Option five times in a row.
How to fix it
Click the Apple menu, choose System Settings, then click Accessibility in the sidebar and choose Pointer Control.
Under Alternate Control Methods, turn Mouse Keys on to use it, or off if it switched on by accident.
Accessibility›Pointer Control›Alternate Control Methods›Mouse Keys
To stop it turning on by itself, click the info button next to Mouse Keys and turn off Press the Option key five times to toggle Mouse Keys.
Using Mouse Keys on purpose? On a number pad, 8, 2, 4 and 6 move the pointer and 5 clicks. Without a number pad, the keys around I move it (7, 8, 9, U, O, J, K and L) and I clicks.
Next time, there's a faster switch: press Option-Command-F5 to open the accessibility shortcuts panel and choose Mouse Keys. On a Mac or keyboard with Touch ID, pressing Touch ID three times quickly opens the same panel.
Still not fixed?
If the pointer is fine but Tab doesn't move between buttons, that's a different feature. Look at Full Keyboard Access in Accessibility settings, under Keyboard.
Accessibility›Keyboard›Full Keyboard Access
If the pointer moves on its own even with Mouse Keys off, unplug any extra mouse or keyboard and see whether it stops. A faulty device or something resting on a key can cause it.
If your built-in trackpad stops working while Mouse Keys is on, check its options. Ignore built-in trackpad when Mouse Keys is on can be turned off there.
If keys still type the wrong thing or the pointer won't stay still with nothing connected, contact Apple Support. The keyboard or trackpad may need a hardware check.
Questions people ask
Why does my cursor move when I type numbers?
Mouse Keys is on. Turn it off in Accessibility, then Pointer Control, or press Option-Command-F5 and switch off Mouse Keys.
How do I click with the keyboard on a Mac?
Turn on Mouse Keys. Then press 5 on a number pad, or I on a keyboard without one, to click.
How did Mouse Keys get turned on?
Usually by pressing Option five times in a row. You can turn that shortcut off in the Mouse Keys options.
Related fixes
Glad it worked.
Sorry it didn't. Tell us what happened and we'll fix this page.
Get there in one click with PinSet.
Press ⌃ ⌥ Space and type “control mouse with keyboard mac”. PinSet opens Accessibility › Pointer Control › Alternate Control Methods in System Settings and rings Mouse Keys. One of 2,400+ checked Mac fixes. Works offline.
7 fixes free · Works offline · macOS 26 and 27