This is mostly for my own reference if I ever need to re-install my Linux OS to have the function keys and media keys working on my Keychron as per the Apple Keyboard. At the time of writing I am using Ubuntu 20.04 LTS and Mint 20.1.
Exact keyboard model is Keychron K2 (v2)
echo 2 | sudo tee /sys/module/hid_apple/parameters/fnmode