C=Key Keyboard interface


C=Key bridges the gap between Commodore and PC keyboard operation!

Depending on configuration, C=Key offers VIC-20, C64, C64C, SX64, C128, C128D, and C128DCR owners the ability to either use their CBM keyboard with a PS/2 supported PC, or utilize a PS/2 keyboard on their Commodore machine.  In either usage, multiple keyboard mappings are supported, to handle keyboard differences and application preferences.  No drivers or programming are required for operation.


C=Key can be purchased in the following configurations:

  • PCB Only: Bare circuit board
  • PCB + uC: PCB and programmed Atmel ATMEGA162, used for connecting CBM KB to PC (includes uC Crystal and trimming capacitors)
  • PCB + uC + Crosspoint Switch: Allows either configuration
  • Preconfigured kits for specific CBM models.

Additional options include:

  • dual joystick connectors can be added, to allow CBM joystick operation on the PC.
  • Any kit can be ordered pre-assembled (please allow additional handling time)


  • A PS/2 compatible keyboard (USB keyboards with PS/2 converters may not work) with a Mini-DIN6 plug.
  • One of the following machines:
  • VIC-20, C64, C64C
  • SX64
  • C128
  • C128D/C128DCR
  • For the SX64/C128D/C128DCR operation with a PS/2 keyboard, a DB25M to DB25M cable is also required.


C=Key models can be purchased at the RETRO Innovations Online Store.

Image Gallery

Technical Details

C=Key consists of an Atmel ATMEGA162 microcontroller in DIP format and an optional Mitel/Zarlink MT8812 crosspoint switch.  In “host” mode, the system reads data from the PS/2 keyboard and emulates the Commodore switch matrix with the crosspoint switch.  In “device” mode, the system scans the Commodore keyboard matrix 60 times a second, converting keypresses into PS/2 compliant scan codes.  GPLv2 licensed C firmware source code can be modified to support nearly any matrix-style keyboard configuration.

Firmware features include:

  • Multiple key rollover support
  • Configurable keyboard matrix scanner supports 1×1 to 16×8 matrices (hardware supports a maximum of 12×8 matrices)
  • Single IC solution (for matrix keyboard to PC configuration)
  • Key repeat functionality supported and PS/2 keyboard compliant

The PCB features include:

  • A single PCB for VIC/64/128/SX64
  • Support for dual joysticks for emulator use.
  • Through hole design makes “do-it-yourself” construction easy.


Bill of Materials

(Bill of Materials)

Assembly Details

  1. Solder all sockets.  Remember to align the pin1 notch
  2. Add X1
  3. Add C1 and C2 (the 18pF caps)
  4. Add C6 (.1uF)
  5. If you have an MT8812 IC, add C3 (.1uF) (the MT8812 is used for PC KB to CBM operation)
  6. Diodes:  Watch the polarity
    1. If you got a full kit (or a X to/from Y), add both D1 and D2
    2. If you got a CBM to PC kit, You want to add D2
    3. PC to CBM, D1
  7. If you got a C64 or C128 kit, add a 1×3 header to LED and add the 330 (orange/orange/brown) to R2
  8. Add R1 (10K- Brown/Black/Orange) and R3 (100K – Brown/Black/Yellow)
  9. For PC KB to VIC/C64
    1. add 1×20 female header to C4, but under the board (so it will plug into existing KB connector)
    2. add 1×20 male to C5. (This allows you to continue to use the VIC/64 KB)
    3. Clip off a 1×20 male header and pull out pin 2 (very important).  Install at C5, paying attention to pin 1.  (This will allow you to continue to use the existing KB)
  10. For C128D KB to PC or PC KB to C128D
    1. Add X5
    2. Add J1,J2,J3
  11. For SX64
    1. Add X5
    2. Add J1,J2
  12. For PC KB use
    1. Add PS2 (PS2 socket)
  13. Add 2×5 male header to ISP
  14. Add J5
  15. Insert IC1 (MEGA162) (WATCH the pin1 notch)
  16. Insert IC2 (MT8812) if present
  17. Insert IC4 (‘245) if present.  (You should only have this on C128(D) KB to PC models.
  18. For CBM to PC usage, you’ll need a mouse cord (I should have made it clearer that is not in the kit).  The 1×4 pads by the PS2 connector:
    1. Power
    2. Ground
    3. Data
    4. Clock
  19. Configure jumper blocks:
    • VIC20/C64/C64C: J5(2-3)
    • SX64: J1(1-2), J2(1-2), J5(2-3)
    • C128/C128D/C128DCR: J1(2-3), J2(2-3), J3, J5 (2-3)
    • For joystick operation: J4(1-2)

Connection Notes:

  • On the PC KB to C128, you’ll have to wire the X5 connector to the internal of the C128.  I have no other option
  • On the PC KB to C128D, you’ll need a gender changer (use a short cable, not a tiny gender bender.)
  • The SX64,C128D both use X5, but it won’t fit in a C64 with that installed.
  • Final Note:  This is still considered a project, not a complete product.  I’ll try to help with issues, but it’s still a work in progress.


The C=Key can operate in a number of configurations, but operates in 1 of 2 modes:

  • PS/2 keyboard to CBM mode
  • CBM keyboard to PS/2 mode

In either mode, the PS/2 keyboard can send “positional” (Shift 2 sends ‘”‘), or “symbolic (Shift-2 sends ampersand character).  As well, there is a C64 mapping and a C128 mapping.  Thus, 4 mapping exist for each mode.


  1. On a PC KB, Hold CTRL/ALT and press BS to enter setup mode
  2. On a C64/C128 KB, It’s CMDR/CTRL and INST/DEL
  3. LED should blink 10 times
  4. press 1,2,3,4 for key mappings.  C64 Symbolic, Positional, C128 Symbolic, C128 Positional.  In the C128 ones, the numpad sends the numpad keys, whereas in C64 modes, the C128 numpad sends C64 top row keypresses
  5. The LED will blink the number you press
  6. Press the key combo again to exit config mode.


Full source, schematics, and PCB designs are available at the github.com repository.

2 thoughts on “C=Key Keyboard interface”

  1. Pingback: URL

Leave a Reply

Your email address will not be published. Required fields are marked *