Adding Keyboard Shortcuts to Command Prompt
The command prompt is a staple feature of Windows. From back in days of old, when Windows was more a piece of software running on top of MS-DOS than it is a fully-fledged system today.
Assessing the Difference
The command prompt, when it was implemented into a program in Windows 95 underwent very little change in the 18 years between Windows 95 and Windows 8.1.
However, a lot of users complained of a lack of flexibility in the system, the inability to copy and paste, the fact that the screen size was always fixed to a certain width – so when maximised it did not behave like a normal program, instead always maximising to cover the left hand side of the screen only. For those of you who want a blast from the past, here’s a screenshot of the command prompt from Windows XP.
If you notice, this does not follow the standard colour scheme of Windows XP, and instead has a scheme that normally occurs in Safe Mode (because the display drivers have not been loaded in). This is how outdated command prompt was. It wasn’t until the release of Windows Vista that we were given aero glass – but apart from this cosmetic outlook, there was nothing else changed.
In today’s command prompt, we have many features that can help us in the administration world, and we shall discuss a few of them just now.
The command prompt in Windows 10 is looking a lot smoother, with the nice font-style, the scrollbars and the UI blend. However, there are more features that make this the best version of command prompt yet.
The Keyboard Shortcuts
Keyboard shortcuts have been the most sought after thing in command prompt, and a feature missed by many system administrators. One of the most useful things, if you spend a lot of time in command prompt, is the ability to view it not just maximised, but full screen. In order to full screen the command prompt, go ahead and press Alt + Enter – and the command prompt will be full screened, as you can see evidenced by the following screenshot.
In order to come out of full screen, you can use the same keyboard combination. This feature is particularly useful if you have a multi-monitor setup, where you can leave it full-screened on one monitor, while working away on another.
Another useful keyboard shortcut (which can also be applied to the mouse), is the ability to modify transparency. You can modify the transparency in the Properties window, but using this keyboard/mouse shortcut means that you can modify the transparency on the fly. The shortcut in question is:
- Increase transparency: CTRL + SHIFT + PLUS (+) / CTRL + SHIFT + mouse scroll up
- Decrease transparency: CTRL + SHIFT + MINUS (-) / CTRL + SHIFT + mouse scroll down
Here is an example of the command prompt at 0% transparency:
And now, using the keyboard shortcut, here is the same command prompt with 70% transparency (the lowest you can go):
There are also a whole host of new keyboard shortcuts for text selection, which is something that was also missed from the older versions of command prompt. In order to keep this section simple, I will simply post a table of the most useful shortcuts and their description. The same information can also be found on the TechNet Library Article, located here.
Now, there are a lot more shortcuts, which you can gain access to by checking the article above, however these are the ones that I find the most useful. As you probably may have guessed, if we can select the entire buffer by CTRL + A, then we are also able to copy and paste text with CTRL + C and CTRL + V respectively. However, CTRL + C will still send a BREAK to the command prompt. If you want to copy text to the clipboard, but without sending the BREAK command, then the shortcut is CTRL + INS (Insert).
There are also a few navigational shortcuts that are handy. These are as follows:
Another good feature of the command prompt, which may not come under text selection, but should definitely be mentioned, is the find dialog. The find dialog allows you to basically search everything that has been output to the command prompt window – particularly useful if you need to double check that a command has propagated properly.
Now, a lot of the things can be completed by navigating the properties window, but if you need certain features on a per option basis, you can edit this via the registry. If you have not used the registry before
, and do not feel comfortable with editing it, it would be advisable to leave things alone.
If you wish to go ahead, I will provide you with a list of the options, what they can do, and what the parameters are – and don’t worry, all the keys already exist!
The preferences are stored in HKEY_CURRENT_USER\Console and here is a list of the keys and what they do. All keys are DWORD values.
Of course this is a per-window setting and will need to be modified with the window opened. Console windows opened by a shortcut will have these settings stored in the shortcut; if the shortcut is copied to another computer, the settings move with it to the new computer. Settings in shortcuts override all other settings, including global settings and defaults.
It should be noted, however, that if you do want the old console back, and enable Use legacy console in the Properties window, this will be global and persist across all windows.
16-bit NTVDM apps always revert to the older console host.