If you’ve gone through the trouble of building your own customized mechanical keyboard, the last thing you want to do is plug it into your computer with some plebeian USB cable from the local ...
This in an example of a custom USB class using ST USB Device library. Current implementation is for a NUCLEO-F401RE, but it can be used as a template for implementing USB communication for your STM32 ...