prompt-toolkit / prompt-toolkit/python-prompt-toolkit
Unable to bind a key to Ctrl-=
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 10.6k
- Forks
- 815
- PR merge metrics
- No merged PRs in 30d
Description
This code results in an error:
kb = KeyBindings()
@kb.add("c-=")
def _(event):
handleCtrlEquals()
ValueError: Invalid key: c-=
When I look in the keys.py file, I don't see a key for c-=. Is this just an oversight?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with src/prompt_toolkit/keys.py and reproduce the shown KeyBindings example using "c-=". Trace how key names are validated and confirm the expected behavior for Ctrl-=; done means the binding is accepted without ValueError and the handler can be invoked.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100