brickbots / framedeck

A Framework mainboard based Cyberdeck
MIT License
983 stars 16 forks source link

The source code for the keyboard firmware with the trackball #5

Closed F1hone closed 2 years ago

F1hone commented 2 years ago

Hi, your work is really impressive I'm particularly interested in this part of the keyboard. It has a trackball, and I want to make a keyboard with a trackball recently, and I happen to have the same trackball as yours, so could you share your keyboard source code for me to learn and reference, it will help me a lot , thank you very much

brickbots commented 2 years ago

Hi! Thanks for your kind words about my work, I'm really pleased people are finding it fun, interesting or informative to some degree :-)

You are pretty much in luck, these trackball modules out put PS/2 signals and are very well supported in QMK, which is a very popular firmware for keyboards.

If you are using QMK already, here's the relevant portion of the docs: https://docs.qmk.fm/#/feature_ps2_mouse?id=ps2-mouse-features

I implemented it just as described in the docs using the USART method as I had the proper pins available and it produces the best results. For my mounting orientation I had to rotate the output by 270degress, which is a simple config option already in QMK. I think I also played with the speed scaling to find something that seemed right for my screen size and tastes.

If you have any questions, or if you are using some other firmware/language let me know and I'll do my best to help!

Good luck on the project!