To assign units or buildings to a hotkey (sometimes called a control group), select the units you wish to assign and then press Ctrl+# where # is the key you want to assign them to. Units and buildings are assigned to the number keys ( 1- 0) along the top row of the keyboard.
Hotkeys also refers to keys that can be assigned to units and buildings or locations. However, keyboard layout changes made through other methods (registry editors like Sharpkeys, for example, or hardware-mapped keyboard layouts) are invisible to StarCraft 2's client, and you must adjust the hotkeys as necessary. If you use an alternate keyboard layout through the Windows layout manager, hotkeys will function as if you were using a QWERTY keyboard, but will be relabeled to accommodate your keyboard - that is to say, if you have an A key where the Q key would be for QWERTY, most hotkeys will treat an A as a Q. Note that any hotkeys listed in this article assume the default hotkey settings, using a standard American QWERTY keyboard. Because there is no mouse movement, using the hotkey is faster than clicking on the Marine icon after selecting the Barracks. 1 For example, a Barracks will produce one Marine when the A key is struck.
Hotkeys are bound to predefined actions and cannot be changed mid-game. Hotkeys execute actions by pressing a key.