As I said, we'll be taking a look at modifier key, which can extend the functionality of your macros, as well as helping to cut back on how many buttons you are using on your action bar.
Modifier keys allow you to change the behavior of a macro when pressing one of three keys. The keys available for use as modifier keys are:
- Shift (shift)
- Control (ctrl)
- Alt (alt)
These three keys allow you to do different things with the same button. It's important, if you want to assign one function while holding the Shift key and one with no modifier, that you tell the World of Warcraft client what to do in each case. This can be accomplished by using the [nomodifier] keyword. Here is an example I use on all of my Blood Elf characters, which allows me to put both racial abilities I use into one button.
/cast [nomodifier] Mana Tap; [modifier:shift] Arcane Torrent
This macro will do two things. If I press the button, which I place on an actionbar, it will cast Mana Tap. If I hold down the SHIFT key and press the button, it will cast Arcane Torrent. As a note, the #showtooltip, when combined with the "?" icon will be change the icon and tooltip to the appropriate spell. In this case the Mana Tap icon and tooltip when I hover over the button, and the Arcane Torrent icon and tooltip while holding SHIFT and hovering over the button.
You can replace "modifier:shift" with "modifier:ctrl" or "modifier:alt" to change the key used. You can also stack all of these modifier keys into one macro, giving you four options with one macro. I don't do this myself, as the class bar works just fine for me, but here is an example you could use if you were so inclined.
/cast [nomodifier] Battle Stance; [modifier: shift] Defensive Stance; [modifier: ctrl] Berserker Stance
Note that each block of instruction, per modifier key, is separated by a semi-colon. That is how you're telling the World of Warcraft client that you're starting a new set of instructions, for different keystrokes in our example.
Hopefully that makes sense to you so that you can start using modifier keys with your macros. I'll go more in depth about the application of these in the future. Next week, I'll introduce you to assigning conditionals to your macros, based on different mouse buttons. Exciting, stuff, my friends! Thanks for tuning in and macro on!