Ì have an application with a text field. If the text field is not active and the person accidentally starts typing on screen they may press lowercase ‘c’. Then a clear cache dialog pops up.
I want to disable keybindings such as that and ‘r’.
It looks like this may be dealt with in 0.89.0 release notes and Disable 'c' as clear cache shortcut (or disable shortcuts all together) · Issue #4048 · streamlit/streamlit · GitHub .
It appears that the “c” keybinding only happens in developer mode (you can check with Chrom incognito mode). However the r keybinding is still active and will cause the app to restart.
1 Like
Hi @shawngiese ,
Thanks for posting! Feel free to open an issue on Streamlit GitHub so we can investigate further. Use these issue example to draft a detailed issue for the team.
opened 08:48PM - 18 Jun 23 UTC
type:bug
status:needs-triage
### Checklist
- [X] I have searched the [existing issues](https://github.com/st… reamlit/streamlit/issues) for similar issues.
- [X] I added a very descriptive title to this issue.
- [X] I have provided sufficient information below to help reproduce this issue.
### Summary
This has had [a few comments in the forum](https://discuss.streamlit.io/t/cant-stop-streamlit-app-using-ctrl-c-if-the-app-has-been-closed-in-the-browser/38738) and I couldn't find mention in a current or closed issue, so documenting here. This is merely a minor inconvenience with an easy workaround for most, but noting for completeness/future searches.
In Windows, the `streamlit run` process cannot be terminated from command line with `Ctrl+C` if there are no connected tabs. The terminal itself must either be closed or a new tab open and connected to the session to register if `Ctrl+C` has been typed. The forum thread mentions a connection to tornado.
### Reproducible Code Example
```Python
# Any valid streamlit app
import streamlit as st
st.write('hi')
```
### Steps To Reproduce
1. From a terminal in Windows, `streamlit run app.py`.
2. Close any/all tabs connected to the session.
3. Ctrl+C in the terminal
(nothing happens)
4. Open a tab and connect to the session
(terminal immediately registers the previous command and correctly proceeds `Stopping...`)
### Expected Behavior
Ctrl+C should stop the process even if there are no active users
### Current Behavior
A connected tab is required to stop the process without closing the terminal
### Is this a regression?
- [ ] Yes, this used to work in a previous version.
### Debug info
- Streamlit version: 1.23.0
- Python version: 3.10.11
- Operating System: Windows 10
- Browser: Edge...or rather "none"
- Virtual environment: Conda
### Additional Information
Thematically related to #6611
### Are you willing to submit a PR?
- [ ] Yes, I am willing to submit a PR!