The thing with steering wheel controllers, at least good ones, is that they turn pedal and steering wheel inputs into joystick ones. The pedals act as an X/Y axis for one "joystick", the steering wheel as maybe just the X axis for another. That is, there's an "analog" component to them. So the reason why it's fairly easy to turn a controller or mouse into a steering wheel is because they have an input that can translate into some sort of X/Y axis range.
Doing this on a keyboard while not impossible, is impractical. Keyboards are completely digital, binary input devices (except maybe if you have a volume wheel, but that's a different story). Which leads you to the following considerations:
- You can either have the input be fully on or fully off. Equivalent in car inputs as pedal all the way down or not touched, or the wheel fully turned or not.
- The input can be interpreted as "if pressed, get stronger, if released, get weaker." But this has the issue of lag in the sense that if you want to fully put on the acceleration or brakes, you can't get a quick response, you have to wait for the "signal" to get stronger.
- It could be that one input = increasing/decreasing the level of something by one step. The problem with this is you can't have too many steps, otherwise it takes too long to get to one extreme or the other. The other is you can't have a "neutral" position; you have to press the opposite action to remove the input (e.g., press the "brake" button to remove the "accelerator" input) rather than simply not provide the input.
While neither of these are perfect, the first one is used the most because you can "pulse" the input as necessary to get an input similar to the second one. And the third one makes zero sense in most cases.