I have two dogs, the smaller one is quite timid though you wouldn't know it when she barks at dogs 10 times her size (she was almost killed because of it but that's a different tale). The problem is she's has developed a neurosis. Whenever I'm typing on my keyboard she flees the room. I don't get it. I've tried everything to desensitize her to no avail. It's a wireless keyboard but the other dog isn't bothered and I can't see any way the keyboard emits sounds in her hearing range. I know of no incident where the keyboard fell on her or my using it makes any difference whatsoever. I can sit in the same place, do paperwork, eat, and nothing causes her to flee except when I begin typing. It's bizarre.
Animals can be weird for completely inexplicable reasons. The dog we had at home before I moved out hated bikes. We raised her from a tiny puppy and she never had any negative experiences with them. But any time she saw someone riding a bike or, god forbid, a motorcycle she completely freaked out- barking and lunging and thrashing if she was on a leash or throwing herself at the windows if we were at home. At first we thought it was just because they were fast moving and, in the case of the motorcycles, loud; but she never bothered with cars, skateboards, roller-skates or anything else along those lines. It also didn't matter if the rider was stationary, or if there was a rider at all. It got to the point we couldn't even leave our bikes parked next to the back door anymore, we had to hide them in the garage. As far as she was concerned, they were the devil.
I've read that dogs bark at and attack things like vacuum cleaners and bicycles because they think the human operating the device is fighting with it. I had a cat who slept on the bed. One night I woke up to a bat flying around the bedroom and down the hall. The cat never came upstairs again.
I once read that dogs have a very strong tendency to make connections with things that are happening at the same time -- that is, things that happen simultaneously but without an actual causal connection. The example was a dog that barks in order to make something happen. The point was that if you spend a lot of time barking, a lot of things happen to happen while you are barking. But the dog will connect the barking to whatever it is that happened. Here, it is possible that a lot of things happen to happen while you are typing at the keyboard. It could have been almost anything. But according to this theory, your dog may have made a causal connection between your typing at the keyboard and whatever it is that happened (something fell, she experienced some sort of pain, she stepped on something, there was a loud noise, etc.) Just a thought.
Agree with C - animals (not just dogs) tend toward sometimes faulty cause and effect. I get home at 10:30pm from work - and I feed the dog his last meal of the "day". On weekends, if I go outside for any reason, for any length of time, when I come in the door, the dog wants to be fed. Even if it's just a morsel. He will not quit whining until he eats something. So if your dog experienced something unpleasant while you were at the keyboard, it could very well be the reason it takes off even now.
I used to babysit a Lab who went berserk every time anyone he knew got onto an outdoor swing. He wasn't bothered if strangers were on them, but would go mental if anybody he knew got on one. He didn't try to bite or anything, but sure tried to drag us OFF the thing. He was serious about this, and I got clawed several times before I decided it wasn't worth it. This was a dog that was normally easygoing, placid, friendly and fun. Weird. He used to get so upset if we sat a swing, even if it remained stationery, he would hyperventilate till we got off again. To @GingerCoffee - I reckon a dog that leaves the room when you're typing is a more desirable pet for a writer than a cat that walks all over your keyboard and deletes your work!