I like your idea, although it is very hardcore and inherently ambitious (simulator).
A few comments about game and code:
1) Relative to the rotation of the spacecraft. Although the possibility of direct activation of the RCS does exist, in fact, the rotation of aircraft and spacecraft is controlled either by setting the angular velocity or by setting the angle of rotation. In general, it would be good to develop a simple regulator for controlling the angular velocity of the spacecraft.
2) And I looked at your source code, and I can say that you do not need to manually attach the activation of the engine to a particular button and there is no need for pre-manual distribution of thruster in directions, instead, in simple cases, you can use a dot-product to determine which engines are directed in the right direction for the desired movement and rotation, for example, like in my example in Activation method. I don't set any threshold in this example, because this script does not interact with physics, but is only needed for special effects, but you can set a special threshold (for example, if dot-product is greater than 0.5). This works well if your engines are directed orthogonally or collinearly to each other. You can see how this works in practice in the demonstration of my other old example.