the easiest cross platform way is to use qmk and flash some firmware on the keyboard itself to map that. tons of software tools for this now
Sad thing is that was two years ago and i've forgotten how to flash it lol.
I can't wait until something like Rust's QMK (i think RMK?) starts to work on more boards. My board having complex modes but the ease of it being written in Rust (because i love Rust) would be a dream for me.
If i could i'd write those type of Rust-QMK for both my Keyboard and Mouse. It really feels great
Edit: typo fix