qmk_cli
qmk_cli copied to clipboard
[Feature Request] Catch `KeyboardInterrupt`s (CTRL-C) in the CLI
Feature Request Type
- [ ] Core functionality
- [ ] Add-on hardware support (eg. audio, RGB, OLED screen, etc.)
- [X] Alteration (enhancement/optimization) of existing feature(s)
- [ ] New behavior
Description
Currently when you press CTRL-C while the CLI is running, you'll see the default Python behavior of showing the (sometimes very long) traceback. This is rarely going to be useful and just clutters the terminal output.
I suggest that we catch KeyboardInterrupts (can be done globally with a signal handler as well) and just exit w/o printing anything. or perhaps just a short message like Pressed CTRL-C or something like that. Thoughts?
This is probably an issue for https://github.com/clueboard/milc.