How can I set auto-casting using hotkeys?

Solution 1:

Actually it's alt + key

One nice usage of it (besides of auto-repair and auto-making inteceptors for Carrier) it's an auto-unborrow on banelings so they unborrows as some unit is nearby thus acting like landmine without need to control them.

Solution 2:

The hotkey for autocasting an action is the action's hotkey with Ctrl.

If R is the hotkey for Repair, Ctrl-R will be the hotkey to toggle Repair autocasting.