went to start my Cobalt, turned the keys on, power flashed on for a second and then everything went out and keys got stuck in the ignition.
Happens A lot when you drive automatic transmission cars. What works for me in such situations is the following. Open the hood remove the positive cable from batter then put it back up, go in car turn to ignition, but not to spin the engine, move your gear shift to drive then back to P, then turn it back and get it out.
That happens when you have no power or some electrical problem. If the above doesn't help get other battery from a friend it will do the trick.
The key not turning off on GM vehicles with low/dead battery is a normal function of the car. Either charge or replace the battery then turn the key to crank and back to off to remove. You can also remove the shroud around steering wheel and press the release button underneath the ignition to turn the key switch fully off and remove key.