susam / uncap

Map Caps Lock to Escape or any key to any key
MIT License
1.07k stars 44 forks source link

Running uncap.exe actively closes my CMD shell #22

Open igreil opened 2 years ago

igreil commented 2 years ago

It's understood that, in the absence of the -c parameter, uncap.exe runs in the background, i.e. has no visible output. I can run it via "WIN-R uncap.exe" and it behaves as expected.

When invoked from the command line, however (i.e. an instance of CMD.exe already running) uncap.exe will not only run and close itself but the window from which it was called as well, meaning I have to rerun CMD.exe to continue working on the command line. Is that expected behavior?

ClausAndersen commented 2 weeks ago

Yes. As it is implmented now it simply hides the current terminal. A better approach would be to detach from the terminal which would leave your window intact - see #29

Because of this the following does not help either:

c:\>cmd /c uncap

But a workaround is to use "start":

c:\>start uncap

This will start a new console which is then hidden. Your current console is then left open as normally expected.