The diagnosis I had from reading your description had almost zero to do with our X. That symptom has been the same since ignition keys came into regular service, what, sixty years ago? Or even without a key, a failure in the ignition circuit causes that outcome. Now in the X, there are indeed more places to look, and some of them would set a fault code. But the basic fault of a loose or defective ignition switch/circuit has been around, well, since the dawn of the internal combustion engine.
I recently fixed a very similar fault on a lawn mower, with magneto ignition. The 'off' switch simply shorts the circuit to ground and stopped working, so the mower kept running. If it had had fault codes there would have been no code, because turning the key did nothing. It was supposed to short the ignition circuit to ground, but didn't. No computer based fault detection system would find this, because it has no way of knowing I have turned the key and that nothing had happened.
A good tech understands that the fault code system has NO clue as to what is wrong. All it can do is report that certain parameters, or groups of parameters, have moved out of an allowed range. It NEVER knows what is wrong.
My 4cs worth.