Macros are a computer rule or pattern that the user "records" short sequences of keystrokes and mouse actions to transform a normally boring repetitive task into a one button solution. Remapping a button on a keyboard is also considered a macro for example a keyboard that has had liquid spilled on it so a few keys no longer work. Using a macro a user can also remap a key to another key.
Computer users who have to do repetitive tasks such as data entry, resizing images, or spamming the same skill in a massively multiplayer online role-playing game (MMORPG) have come to use the macro function to make their task easier. When I was playing the MMORPG Ragnarok Online in 2004 a tool named AutoHotKey was given to me by a guildmate to help spam damaging spells at blistering speeds as some spells stack on top of each other. This simple tool can also be configured to use a healing potion if your health points (HP) dropped below a certain hex color value. Which gives an unfair advantage against the unaware.
Currently due to the game breaking nature of automated hotkeys many online games have banned the use of third party software in their terms of service (TOS).