The first post, the background for question: I have a custom computer with a custom case that I would like to re-purpose the power switch on, but only when the computer is running.
I have a Teensy board (similar to Arduino http://www.kynix.com/Search/Arduino.html) inside the case that handles button presses and communicates to the custom application I have via USB. The problem is, the front panel only has 2 buttons, one is being used for the motherboard power switch, so I only have one available and I need 2. I don't want to physically add a new button for aesthetic reasons.
At first, I looked into Windows APIs for detecting the power button pressed, but it looks like the only way to do this is with a custom driver, and that's a route I don't want to go down (and I don't have a signing key for an x64 driver anyway).
So what I want to do is be able to use the motherboard power switch (on the front panel) to power on the computer, or wake it from sleep, but when the computer is running, have my Teensy board detect the press. I've already set in Windows to have the power button do nothing when it's pressed while Windows is running. I just need to figure out how to connect the Teensy board to the power switch to detect this without screwing with the power switch operation when the computer is off and going to be turned on.
The Teensy input can be configured to be external (where it must have high +5V or low 0V all the time - floating inputs do not work), or configured to have an internal pull up so it is high when floating externally, and low when connected externally. The Teensy runs off USB +5V power, and I have confirmed that the USB ground and the power switch ground are the same ground.
Alas, searching online, I've had trouble finding specifications for how the power switch works, or even if it is standard amongst different motherboards. So my question is, is there a way I can hook up to the motherboard power switch pins to still power on the motherboard when it is off (and the Teensy is therefore also off - no power on USB while off), but detect the button press on the Teensy input while it is on?
Thanks all advises.