The PC Keyboard Interface
by Miguel Angel Rodriguez Jodar and Ben Versteeg

The PC Keyboard interface enables you to connect a standard PS/2 style keyboard to your Sinclair ZX Spectrum 16K / 48K / 48K+ / 128K+ / +2 (grey model) home computer (NOT compatible with +2A / +2B / +3), to use in place of its own keyboard.

This can make for a much more comfortable typing experience - particularly if you are used to the rubber keyboard mat. The interface will also work with USB keyboards, provided that you have a USB-PS/2 adaptor to enable it to plug into the interface.

The interface is designed with simplicity in mind and plugs into the ZX Spectrum's expansion port.

The interface also contains its own firmware which is the software which interprets the signals from the keyboard - this can be updated at any time from your own ZX Spectrum.

Click here for the full PC Keyboard Interface manual.

Use the Contact Me form on my Blog (link above) for ordering information.

The PC Keyboard Interface is compatible with the ZX Spectrum 16K / 48K / 48K+ / 128K+ / +2 (grey model).

The PC Keyboard Interface will not work on a ZX Spectrum +2A / +2B / +3.
There are also known compatibility issues with the MB02 / MB02+IDE interface.

The PC Keyboard Interface works perfectly together with these devices:
" DivIDE / DivIDE Plus
" Kempston Mouse Turbo

The built-in keyboard of your ZX Spectrum will be disabled when the PC Keyboard interface is attached. You cannot use the built-in keyboard of the ZX Spectrum and the PC Keyboard Interface at the same time.

Keyboard Layouts Supported
Please note that the current version of the firmware (1.3b) only supports US English and Spanish keyboard layouts.

Using PC keyboards with a different layout may result in unsuspected characters or behaviour.

How to connect the PC Keyboard Interface
The interface simply plugs into the expansion port on the Sinclair ZX Spectrum:

Be sure to turn off the power of your ZX Spectrum before connecting the PC Keyboard Interface!

You can have other devices between the ZX Spectrum and the PC Keyboard Interface, provided that they have a through connector.

Or you can use the through connector of the PC Keyboard Interface to connect other compatible devices.

Keyboard Features
There are obviously some differences between the layout of a PC keyboard and the ZX Spectrum keyboard's layout. To compensate for this, PC keyboard-keys are mapped to key-presses on the ZX Spectrum in a certain way, but this will need some explanation and practise.

First of all we have tried to map the keys on the PC keyboard to those on the ZX Spectrum so that all of the alphanumeric characters (with or without SHIFT and CAPS LOCK) match those on the ZX Spectrum as far as possible.

If your PC keyboard has a numeric keypad, it will also work, and behaves as if numlock is enabled.

The next table details how the non-alphanumeric keys on the PC keyboard are mapped to the ZX Spectrum:

* Some PC keyboards have a normal ALT-key on the right hand side, others have a ALT-GR key instead of the normal ALT-key.

Sinclair Joystick Mode
The keyboard can be made to emulate a Sinclair ('port 2') joystick if required.

Press the Scroll Lock key to switch the keyboard between normal mode and the Sinclair joystick mode. The Scroll Lock led is illuminated to indicate when the keyboard is running in Sinclair joystick mode.

In Sinclair joystick mode, the cursor keys emulate the Sinclair joystick (keys 6,7,8 and 9) and the left ALT key is mapped to the fire-button (the 0 key).

Hard Reset for the ZX Spectrum
The PC Keyboard interface has a handy feature whereby pressing CTRL ALT DEL will reset the ZX Spectrum.

You do not need to press a reset-button or pull out the power lead anymore.

The PC Keyboard interface contains intelligent logic for recording macros.
A macro is a recorded set of key presses.

You can assign a macro to one of the function keys from F5 to F10.
After recording a macro it's available on those function keys, so that you can then quickly recall them at a later stage.

Even better, the macros are stored in flash memory on the interface, and therefore retained whilst the ZX Spectrum is turned off!

To record a macro:
1. Press F3 (or the HOME key) on your PS/2 keyboard to start recording a macro.
2. Press the function key (F5 to F10) to which you wish to assign the macro.
3. The CAPS LOCK LED will be illuminated so that you know you are in macro recording mode.
4. Carefully type the sequence of keypresses which you wish to record (up to 512 keypress sequences - a key pressed down and released is 2 sequences).
5. You can press PAUSE at any time to pause recording - press PAUSE again to continue.
6. Press F4 (or the END key) on your PS/2 keyboard to finish recording the macro.

To play the macro (echoing the stored sequence of keypresses), simply press the function key which you assigned. The CAPS LOCK LED will be illuminated so that you know you are in Macro playback mode. PAUSE can be used to pause playback mode - press it again to continue.

NOTE: you can only cancel the playback mode by pressing CTRL ALT DEL (to force a hard reset) or by powering down the ZX Spectrum.

Updating the Firmware
The PC Keyboard Interface has a unique feature of being able to update the firmware of the interface itself, directly from your ZX Spectrum!

Of course this may not be necessary to do yourself.

The flash-utility can be loaded by playing a WAV-file from your PC or laptop, or by loading a TAP-file from an IDE interface, such as the DivIDE Plus.

To be able to update the firmware you will need to switch the PC Keyboard interface into 'Failsafe Mode', by powering off your ZX Spectrum, and placing a jumper as shown in this picture:

After powering on again, the Failsafe Mode is indicated by the Scroll Lock led being lit. With the Failsafe Mode enabled, load the flash-utility by e.g. LOAD "". Once the update-utility is loaded, press the ESC key on the PC keyboard to start updating the firmware on the PC Keyboard Interface.

The utility has some protections to avoid the update being corrupted, but even if that should happen, the failsafe mode can still be entered to try the update again, if necessary.

Built-in diagnosing tools
There are two mechanisms built into the PC Keyboard Interface to test the interface and help diagnose problems.

1) When you start up the Spectrum, press ALT+F12 on the keyboard.

The following sequence should appear on the ZX Spectrum's screen:
REM 12345qwertasdfgZXCV67890yuiophjkl*,.

2) When you start up the Spectrum, press ALT+F1 on the keyboard.

This starts a comprehensive test-tool.
You can use this tool for example to test whether the keyboard supports pressing several keys at the same time (to get the combinations required for the ZX Spectrum keywords and many games).

More info can be found on Miguel's website.