The project involved converting a laptop keyboard from an MSI GS75 into a standalone USB device. The developer utilized an STM32F411RET6 microcontroller to interface with the keyboard's 26-pin ribbon cable, which uses an 8x18 matrix configuration for its 102 keys.
To determine the unknown pinout, the developer created a diagnostic firmware and a Python utility named gs75_matrix_mapper.py. This setup automated the identification process by testing connections between pins, confirming each key's electrical coordinates through repeated measurements.
The hardware design features a custom two-layer PCB with a USB Type-C connector. The assembly process required a trinocular microscope due to the small size of the components. The final prototype supports NKRO, Fn key combinations, and multimedia controls.
A significant challenge was addressing ghosting, an issue where pressing three keys in a matrix can cause the controller to register a fourth, unpressed key. Since the keyboard lacks individual diodes, the developer implemented a conservative firmware algorithm to detect and suppress these ambiguous inputs.
The system operates with a 1000 Hz polling rate, scanning the matrix every millisecond. The firmware includes a 5 ms debounce filter for each coordinate and supports both Boot Protocol (6KRO) and NKRO USB HID reports to ensure compatibility with operating systems.





