This project uses Raspberry PI pico and USBHID library to read scancodes from keyboard, and then convert them into usb keycodes and send them to computer.
You need to paste "#define US_KEYBOARD" into USBKeyboard.cpp.
This project was written in C++ in Arduino IDE with added module for PI pico support.
From keyboard to PI pico:
- 1(VCC) to VBUS
- 2(DATA) to GP2 via 10k ohm ressistor
- 3 N/C
- 4(GND) to GND
- 5 N/C
- 6(CLOCK) to GP3 via 10k ohm ressistor
- Keycodes.h contains array of USB keycodes indexed by PS/2 scanset3 codes
- Queue.h/Queue.cpp is a class that implements a queue style data structure
- PS2.h is a class taht reads codes fromkeyboard
- ModelM122toUSB.ino is a main file where we read codes,then convert them and send them to PC
Picture of keyboard with all corespoding scanset3 codes
Grey keys are the release sensitive keys when they are pressed keyboard sends their codes but when they are released keyboard sends first 0xF0 and then their codes.
WKeys on the left and function keys are registered only onece on pressdown.