I guess I don't know the magic words to narrow my search to Mac programming on google, and I'm not entirely familiar with the mac API anyways, but I'm sure there's event handling. So you could...