ZX Spectrum Keyboard Matrix

The original ZX Spectrum keyboard consists of 40 keys arranged as eight half-rows of five keys. The keyboard is read through the ULA using the address and data buses.

Address format:
Address Port D0 D1 D2 D3 D4
A8 65278
A9 65022
A10 64510
A11 63486
A12 61438
A13 57342
A14 49150
A15 32766

Keyboard Status

Key pressed: None
Address line:
Data bit:
Port address:
Keyboard bit: 1
Page Revised: 06/08/2026