Press on one of the hands next to the portrait of your mage. Then you get a dropdown menu below it, where there are a few buttons. One of the buttons will have the same icon as the spell your mage learned. (usually a moon with stars). Click on that icon. Now you have assigned an actionkey
You can assign two action buttons like this, a primary and a secondary. The primary action will occur when you press the left mousebutton, the secondary will occur if you press the right mousebutton.
Cheers