This page won't cover how you should write your firmware in full detail. There are a bunch of other resources that cover this topic really well.
We recommend that you use RMK, since it's modern and easy to use. Here is a tutorial for getting started with RMK.
#The basics
#Set up your environment
- Install RMK's CLI and Rust, or use GitHub Actions to automatically build your firmware.
#Build your first firmware
- Configure your keymap and matrix and compile.
#Flash firmware
- Upload the compiled firmware to your Pico.