When you’re outside melee radius and left-click, you obviously can’t hit the enemy with a melee attack. What you can do though is select him for a magic attack. Until now magic attacks were sent either to the clicked enemy or the closest enemy (when triggered from keyboard), but now you can also specifically set a target, not necessarily the closest enemy, for magic attacks from your keyboard.
Highlighting enemies is not as easy as it sounds: you need to calculate its outline first. This has all been done before and it would be a waste of time to re-invent the wheel. Therefore, we used a special asset called the Highlighting system, which works perfectly in this kind of situation.