For example: The Keychron C3 HE I'm typing this on (which I ranted elsehere about lacking the open-source/QMK firmware it is advertised to have) has some peculiar features that it supports. The way they used Hall effect keyswitches lets some fun stuff happen.
That fun stuff includes 3 different modes: One is just a keyboard, and the other two modes let the keyboard behave exactly like a game controller. At least one of those game controller modes even lets keys behave as analog inputs.
I haven't knowingly used this keyboard in game controller mode, but perhaps it is something can be selected by software (in addition to the multi-key combo listed in the book).