Long before Obama gave a commencement speech to Air Force cadets Wednesday, his campaign was focusing attention on his record with military families and veterans — a key voting group that could make the difference in swing states like Virginia, North Carolina and Florida.