Given the wide variety of possible solutions from keyboard firmware to operating system specific solutions, I'd like to leave the question wide open in order to discover which solutions are actually most commonly used by people who have this need in 2021.
I am personally most interested in solutions that work for the macOS and Linux operating systems. Although iOS and Android solutions are also of interest to me.