I have an aftermarket Alpine stereo installed and love it. No it's not as clean looking as the factory setup but, it offers the missing features the factory stereo just could not offer. That said the one thing that I really liked about the factory stereo was that it did not shut off until you pull the key literally out of the ignition. Installing the Alpine deck many many years ago lost that feature and I've always been searching for a way around that.
So for the past view days I've been literally sitting in my car trying to find something I could tap the "remote switch" wire from my aftermarket stereo into that I knew would not turn off until the key was pull out of the ignition. I only found two options, was the power windows or into the one of the small L.E.D. bulbs for the window and lock buttons on the driver side door. The down side to this is that once the door opens those stopped receiving power. Not exactly how the factory stereo worked before... but it was close.
Then I just happen to find the smoking gun in a VW thread talking about the 75x post and the key sense wire. The 75x post/terminal which is basically an area behind the fuse panel that would switch on when the key was actually turned on but would go off when the key was in the off position. Still no help there, but then there was this "Key Sense" topic, in which VW's have a wire that comes from the ignition switch (where insert your key) in which will only power off when the key was pull out of the ignition. That's the one!.... but our cars are follow a different wiring color so it was anybody's guess which was which. Then further down in the thread one person asked about this Key Sense wire for a Audi C5 A6. Lucky me, there was a single reply and the replier said it was the thin red wire. Thinking those ignition switches got to be nearly the same on the S4, this has got to be it!... oh wait, there is 3 solid red wires and the size doesn't vary that greatly. Well I took a chance and based of a poor viewing angle and touch, I tap into what seemed like the thinnest red wire... Insert drum roll... and sure enough, it was the key sense wire.
So I start to wire it up but kept thinking to myself that I swear I've done this setup before and something didn't work out. That's when it hit me, I had gone through the same exact process when I had my MK3 VW Jetta VR6 likely 10 years ago. I remember getting it wired and a few days later the key sense wire went dead. A little searching later, I found out that it was because the stereo was using the voltage from that key sense wire when the ignition switch was not design for it. Basically it blew some sort of internal fuse or something within the ignition switch. So not to make the same mistake twice I found a 12v four pong relay I had laying around and wired it up so that when the key was in the ignition the relay would relay the power from constant 12v wire rather then the key sense wire to the stereo's remote switch wire. A little soldering, electrical tap, and few zip ties later...
Key set to the on position: Stereo ON
Key set to the off position from on: Stereo stays ON
Key pulled from ignition: Stereo OFF
Finally the way I wanted it! Long story short, there is a key sense wire on the B5 Audi S4 and it is possible to wire up your aftermarket stereo so that it does not power off until you pull the key completely out of the ignition. Look for a thin red wire from the back of the ignition switch and wire up a relay to a constant 12v connection. Sorry guys no pics and step by step, but I may put a video up later this weekend with a general walk through much like the fog light mod.