I have a 2011 air (13") that is out of warranty. The keyboard is having issues. When I first open it the a key doesn't always work. Same with the delete key. Is there anyway I can fix it via software?
I'd take it to either an authorized Apple repair depot or an Apple store for some diagnosis. Repair via software? Anything is possible, but in my mind unlikely.
My advice is that you take it to an authorised Apple dealer. Individual keys may need replacing; it is possible that the keyboard may need replacing - you do not know the extent of the problem until someone qualified has been able to identify it.
I had problems with the letter 'a' on my 2013 MBA's keyboard last year - the 'a' had become detached, and kept falling off, despite my attempts to secure it.
When I was home, I took it into an authorised Apple dealer. 'A" was not the only key giving trouble - ironically, the number '1' was also problematic. Anyway, the computer was still under warranty, and I also have Applecare.
While I assumed that the errant keys would be replaced, in fact, the entire keyboard was replaced under Applecare.
I would first boot a Linux USB to rule out a software problem. If it still doesn't work, it's a hardware issue.