Right. As long as you keep the headspace filled with co2, you'll be fine. Just think of a keg as a big bottle. If you open it up, then your beer will be flat and stale. If you keep it closed and the co2 in the headspace (like a capped beer bottle), it'll fine for ages.