Hi orangepekoe,
If the keyboard on your MacBook Air is responding erratically, try the following troubleshooting steps:
OS X Yosemite: Reset your computer’s PRAM
http://support.apple.com/kb/PH18761
If your Mac doesn’t seem to be remembering your speaker volume, display resolution, or the disk it should be using during startup, you may need to reset your computer’s PRAM.
Resetting PRAM may change some system settings and preferences. Use System Preferences to restore your settings.
Important: To print these instructions, click the Share button

in the Help window, then choose Print.
Choose Apple menu > Shut Down.
Locate the following keys on the keyboard: Option, Command (⌘), P, and R. You will need to hold these keys down simultaneously in step 4.
Turn on your Mac.
Immediately press and hold the Option-Command-P-R keys. You must press this key combination before the gray screen appears.
Continue holding the keys down until your Mac restarts, and you hear the startup sound for the second time.
Release the keys.
After resetting your computer’s PRAM, you may need to update your speaker volume, display resolution, and startup disk preferences. For more information about PRAM, see the Apple Support article About NVRAM and PRAM.
Last Modified: Jan 6, 2015
Intel-based Macs: Resetting the System Management Controller (SMC) - Apple Support
http://support.apple.com/en-us/HT201295
Note: Portable computers that have a battery you should not remove on your own include MacBook Pro (Early 2009) and later, all models of MacBook Air, and MacBook (Late 2009).
- Shut down the computer.
- Plug in the MagSafe power adapter to a power source, connecting it to the Mac if its not already connected.
- On the built-in keyboard, press the (left side) Shift-Control-Option keys and the power button at the same time.
- Release all the keys and the power button at the same time.
- Press the power button to turn on the computer.
Note: The LED on the MagSafe power adapter may change states or temporarily turn off when you reset the SMC.
I hope this information helps ....
- Judy