Sound when user types in input box

Is it possible somehow to have a sound play when a user begins to type in an input box?
Like a sound (maybe a sketching sound) would start when user begins to type, then it would stop when they stop typing.