USB Keyboard IF
USB Keyboard IF
Hi all,
based on the project from Alex:
https://codeberg.org/xelalexv/spectratur
I build a keyboard interface for the QL. Basically it consists of an Arduino Nano and a switch matrix array MT8812. The matrix array is directly attached to the original keyboard sockets (J11 and J12) thus I expect only minor incompatibilities. It allows to attach a PS/2 or USB (emulating PS/2) Keyboard to the Arduino. Currently it is in a very early stage but I want to use the opportunity to ask for your opinion and features you may interested in.
So far what I obtained:
- Build the IF on my breadboard, all keys are working as expected. More testing is required
- Only add 2 additional keys so far, "Backspace" and "Delete"
- Only German keymap so far. No idea if modification for UK keymap is required. But it should be doable
What to do next:
- Build a proper PCB which fits inside the QL (obvious)
- Define keypad keys
- Any additional Key combinations required more than Delete and Backspace? What do you would need?
- Joystick support to map Joystick on (variable) keys. Is this a need from your point of view?
Any comment is highly appreciated.
Best regards,
Stephan
based on the project from Alex:
https://codeberg.org/xelalexv/spectratur
I build a keyboard interface for the QL. Basically it consists of an Arduino Nano and a switch matrix array MT8812. The matrix array is directly attached to the original keyboard sockets (J11 and J12) thus I expect only minor incompatibilities. It allows to attach a PS/2 or USB (emulating PS/2) Keyboard to the Arduino. Currently it is in a very early stage but I want to use the opportunity to ask for your opinion and features you may interested in.
So far what I obtained:
- Build the IF on my breadboard, all keys are working as expected. More testing is required
- Only add 2 additional keys so far, "Backspace" and "Delete"
- Only German keymap so far. No idea if modification for UK keymap is required. But it should be doable
What to do next:
- Build a proper PCB which fits inside the QL (obvious)
- Define keypad keys
- Any additional Key combinations required more than Delete and Backspace? What do you would need?
- Joystick support to map Joystick on (variable) keys. Is this a need from your point of view?
Any comment is highly appreciated.
Best regards,
Stephan
Last edited by Maskenlos on Sun Jun 23, 2024 6:50 pm, edited 1 time in total.
Re: USB Keyboard IF
Nice project - does it deal with CRTL, ALT and SHIFT keys and combinations of those with other keys - the IPC code has some special cases - particularly with the HERMES IPC replacement - that you may want to handle.
Re: USB Keyboard IF
Impressive. I would be far more interested in a QL matrix to PS/2 converter though 

Re: USB Keyboard IF
Pr0f, anything particular you want me to test? So far I only tested the basic combinations with CTRL (e.g. CTRL + arrow left) and with SHIFT. This works well. I do not have a Hermes, so I can not test Hermes specific things.
Peter, fully understand your demand. Probably this is useful to you:
http://www.deblauweschicht.nl/tinkering/qlkeys1.html
Maybe I will give it a try after I have finished this small project. But in your special case the Arduino may be omitted?
Stephan
Peter, fully understand your demand. Probably this is useful to you:
http://www.deblauweschicht.nl/tinkering/qlkeys1.html
Maybe I will give it a try after I have finished this small project. But in your special case the Arduino may be omitted?
Stephan
-
- Font of All Knowledge
- Posts: 4684
- Joined: Mon Dec 20, 2010 11:40 am
- Location: Sunny Runcorn, Cheshire, UK
Re: USB Keyboard IF
Hi Stephan,Maskenlos wrote:Pr0f, anything particular you want me to test? So far I only tested the basic combinations with CTRL (e.g. CTRL + arrow left) and with SHIFT. This works well. I do not have a Hermes, so I can not test Hermes specific things.
Peter, fully understand your demand. Probably this is useful to you:
http://www.deblauweschicht.nl/tinkering/qlkeys1.html
Maybe I will give it a try after I have finished this small project. But in your special case the Arduino may be omitted?
Stephan
Looks good, I will have a go at making this interface, for one of my QLs.
Regards,
Derek
Derek
Re: USB Keyboard IF
So 8x12 gives 96 keys. The QL has a 9x11 matrix for 99 keys. Which 3 keys are not supported. Also, in the picture I see 9 & 8 for ribbon cables going to the keyboard connector...so not all lines are used?Maskenlos wrote:Hi all,
based on the project from Alex:
https://github.com/xelalexv/spectratur
I build a keyboard interface for the QL. Basically it consists of an Arduino Nano and a switch matrix array MT8812. The matrix array is directly attached to the original keyboard sockets (J11 and J12) thus I expect only minor incompatibilities. It allows to attach a PS/2 or USB (emulating PS/2) Keyboard to the Arduino. Currently it is in a very early stage but I want to use the opportunity to ask for your opinion and features you may interested in.
Nice seeing a German board. Very similar to the US ones except they don't have that little daughter board on top of memory near the CPU

Re: USB Keyboard IF
I just counted the keys on my QL, if not miss-count there are 65 keys. Could anyone kindly double confirm
To be honest, there are no keys missing, even better, there are keys on the PC Keyboard which not even exist on the QL keyboard:
- Backspace
- Delete
- / (on the Key-Pad)
- x (on the Key-Pad)
Also its a mystery that the QL has a 9x11 Matrix, the 8049 IPC only supports 8x8 Matrix. Kindly check the diagram below. So a MT8812 and 3 external diodes will do the job. 8 & 9 ribbon cable are correct, as I do not use pins 1,2 & 11 from J12.

To be honest, there are no keys missing, even better, there are keys on the PC Keyboard which not even exist on the QL keyboard:
- Backspace
- Delete
- / (on the Key-Pad)
- x (on the Key-Pad)
Also its a mystery that the QL has a 9x11 Matrix, the 8049 IPC only supports 8x8 Matrix. Kindly check the diagram below. So a MT8812 and 3 external diodes will do the job. 8 & 9 ribbon cable are correct, as I do not use pins 1,2 & 11 from J12.
Re: USB Keyboard IF
Sorry, of course 64 keys as there are 2 Shift keys. And in almost all cases 8x8 is 64 
