Hi all,
I'm working on a project that includes repurposing an old Amstrad CPC-464 keyboard into a USB keyboard.
It uses a membrane with a 10 row, 9 column matrix and I have gotten as far as wiring up the existing ribbon connectors to an Arduino Leonardo and built a very simple program to using Keypad/Keyboard libraries.
A sample of the arduino code is below (only bothered to map the alpha chars at this stage):
const byte ROWS = 10; //four rows
const byte COLS = 9; //four columns
//define the cymbols on the buttons of the keypads
char keys[ROWS][COLS] = {
{ '+','+','+', '+', '+', '+', '+', '+', '+'}, //1
{ '+','1','2', '+', 'q', '+', 'a', '+', 'z'}, //11 0x04 => KEY_CAPS_LOCK = Map change
{ '+','4','3', 'e', 'w', 's', 'd', 'c', 'x'}, //12
{ '+','6','5', 'r', 't', 'g', 'f', 'b', 'v'}, //13
{ '+','8','7', 'u', 'y', 'h', 'j', 'n', '+'}, //14
{ '+','0','9', 'o', 'i', 'l', 'k', 'm', ','}, //15
{ '+','+','=', '@', 'p', ';', ':', '/', '.'}, //16
{ '+','+','[', '+', ']', '4', '=', '\\', '+'},//17 0x7e (ª), 0x01 = KEY_LEFT_CTRL, 0x02 = KEY_LEFT_SHIFT
{ '+','+','+', '7', '8', '5', '1', '2', '0'}, //18 0x81 = COPY = Ctrl +c
{ '+','+','+', '+', '9', '6', '3', '+', '.'} //19
};
byte rowPins[ROWS] = {9, 10, 11, 12, A0, A1, A2, A3, A4, A5}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {0, 1, 2, 3, 4, 5, 6, 7, 8}; //connect to the column pinouts of the keypad
What I didn't realise is how complicated the programing behind a keyboard actually is..... I can happily get single keystrokes working and even got some press and hold working but it's nowhere near a fully functional qwerty keyboard.
After a few days playing around I got onto searching for custom firmware solutions and came across QMK/TMK.
I've looked at a few videos/tutorials but can't figure out where to start or if QMK is even the right solution for what I want to do. My specific questions:
- Is QMK or TMK suitable for my project?
- If so, where do I start? I've looked in the QMK repo and I can't see any layouts for CPC-464 (not surprising!) - can I make my own?
Just looking for some general advice, happy to do the hard work but I'm stumped at the moment.
P.S. I love the look of this keyboard, will be very happy if I can get it working. A couple of photos below for reference
https://imgur.com/PgvSadGhttps://imgur.com/xRf0Dcwhttps://imgur.com/6n8lTWC