humbletech99 Posted April 28, 2008 Report Share Posted April 28, 2008 I'd like to map the key combination Control-D to quit cmd.Does anyone know how to define what key combinations do in cmd?For example Control-C kills the current program in cmd and returns the prompt, so where is this defined and how can I map other key combinations to things like quitting out of cmd? Quote Link to comment Share on other sites More sharing options...
ɹəuəllıʍ ʇɐb Posted April 28, 2008 Report Share Posted April 28, 2008 I don't think you can modify the command prompt behavior; I think it's completely hard-coded. There are several docs on the Internet that describe the existing keyboard shortcuts, but I haven't seen anything that allows modifying them. Quote Link to comment Share on other sites More sharing options...
homecomputeraid Posted May 1, 2008 Report Share Posted May 1, 2008 Doskey lets you do some interesting things:http://www.computerhope.com/doskeyhl.htmhttp://technet.microsoft.com/en-us/library/bb490894.aspxOne for Doraemon (Japanese version)http://www.microsoft.com/japan/technet/win...6.mspx?mfr=true Quote Link to comment Share on other sites More sharing options...
humbletech99 Posted May 1, 2008 Author Report Share Posted May 1, 2008 doskey is interesting, but it doesn't seem to allow for what I asked for?Thanks for the doskey tip though, I do like that.I'd love to know if there is any way of mapping keys like Control-D to exit or something.... Quote Link to comment Share on other sites More sharing options...
Scarecrow Man Posted May 1, 2008 Report Share Posted May 1, 2008 'EXIT' is an internal dos command and cannot be modified.Press - CTRL + D (2 keystrokes)Press - E X I T + Return button (5 keystrokes)Is it really worth it? :) Quote Link to comment Share on other sites More sharing options...
humbletech99 Posted May 2, 2008 Author Report Share Posted May 2, 2008 do you know unix? When you put lots of these things together, it's so much more convenient to zoom around... so it's worth it. Quote Link to comment Share on other sites More sharing options...
Scarecrow Man Posted May 2, 2008 Report Share Posted May 2, 2008 You're right about that. I do agree that CTRL+D is a nice quick shortcut.Unfortunately Microsoft doesn't like people changing their programs so they keep them under lock and key. Chances are you cannot modify the dos program without an external program that when ctrl+d is pressed, performs an EXIT command on the dos window. Quote Link to comment Share on other sites More sharing options...
jeremysimmons.net Posted June 3, 2013 Report Share Posted June 3, 2013 -- This is a post necro. I shamelessly admit -- This is possible via a technique mentioned on SuperUser.com.http://superuser.com/questions/144347/is-there-windows-equivalent-of-the-bashrc-file-in-linux#comment146476_144348 ; Run a command when CMD.exe starts[HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor]"AutoRun"=%USERPROFILE%\CmdAutorun.cmd Make the file contentsdoskey∙♦=exit (♦ is [char]4) You will most likely need to use an advanced editor to enter the 04 character, as it's a non-printable ASCII character.I used XVI32 http://www.chmaas.handshake.de/delphi/freeware/xvi32/xvi32.htm Press CTRL + D, then {Enter} to close your CMD shell! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.