Since this is the data frame format of PS/2,
A data frame is made of 11 or 12 bits (depending on data direction):
- a start bit (always low)
- 8 data bits, LSB first
- a odd parity bit
- a stop bit (always high)
- an acknowledge bit (the device pulls the data line low when transmitting from host to device)
Using SPI or UART would not be compatible.
The easiest way to read data sent from a PS/2 keyboard is to use external interrupts. All microcontrollers allow to trigger an interrupt when a specific event occurs on an external pin and most of them have a dedicated external interrupt controller. During device to host communication the host samples the data line when the clock is low, so it’s easy to set up a trigger when the pin connected to the clock line goes low and read the scan code from the keyboard.