On some keyboards you can hold down the vowel you want to add a macron to and it will show options for you to select the right character. In this case you use the number 8 to select the macron for the a.
If this doesn't work for you, you may need to set your keyboard up to be able to type using macrons. Below are a couple of links to websites that have instructions on how to do setup and then type using macrons.