Mouseover macros work independent of hardware. There's two variations you can choose from here.
a) Click-to-cast mouseover: You click the unit frame you want to target with the spell with a different mouse button for each spell (example: left click -> divine light, right click -> holy light, middle click -> flash of light -> shift+left -> holy shock etc.). Addons such as Clique are used to facilitate this.
b) Key-bound mouseover: You move your cursor over the unit frame you want to target then hit a key binding associated with the spell. Clique can also do this, however it's not needed if you only use keyboard buttons as the behavior can be replicated with a macro:
Code:
#showtooltip
/cast [@mouseover]Spell name here
Alternative macro which will default to the usual targeting if your mouseover unit is not friendly.
Code:
#showtooltip
/cast [@mouseover,help][]Spell name here