Not sure why this should happen when you are typing text. Have you tried...
control panel - network connections - right click on the wireless connection and choose properties.
click on the Configure button - under "Power Management"
If there is a tick in the box beside "Allow the computer to turn off this device" then untick it.
Which wifi channel are you using on your router? Recommended are 1, 6 and 11.