How do I type Māori macrons?

Type a vowel followed by =: a= gives ā, and the same works for ē, ī, ō and ū. You can also type a backtick before the vowel (`a), or click the letters on the on-screen keyboard. Use a capital letter for capitals: A= gives Ā.