prompt-toolkit / prompt-toolkit/python-prompt-toolkit
More xterm escape codes
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 10.6k
- Forks
- 815
- PR merge metrics
- No merged PRs in 30d
Description
There are some xterm escape codes which are not handled by prompt_toolkit. These include, but are not limited to, modified (ctrl- / alt- / shift-ctrl- / ...) function keys.
http://aperiodic.net/phil/archives/Geekery/term-function-keys.html
https://www.xfree86.org/current/ctlseqs.html
It is possible to work around this by having key bindings defined as follows, though:
@kb.add('escape', '[', '1', '5', ';', '5', '~')
def cf5(event):
logger.info('c-f5 captured')
Would adding support for some of them be a good idea for a PR?
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
Review the xterm escape-code references and the prompt_toolkit key-binding example in the issue, starting with how kb.add handles the shown sequence. Define which modified function keys are in scope and what supported decoding should look like; the issue names no files or tests, and it has no settled implementation target.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100