prompt-toolkit / prompt-toolkit/python-prompt-toolkit

Context Menus

Open
#1,449 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
10.6k
Forks
815
PR merge metrics
No merged PRs in 30d

Description

How would I go about creating a context menu? Where you right click, and then a menu with options pops up near the cursor?
tmux does this: on Ubuntu, you can right click and then a menu pops up with options such as split pane and close pane etc. In web browsers, you can right click on an image to get the save image button. And in text editors, you right click text to get menus that trigger refactorings such as rename variable etc.

Does anybody have any idea how we could accomplish this in prompt toolkit?

If it's not possible, would you be open to a pull request @jonathanslenders ?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not name any files, tests, or entry points. Start by locating the input and interaction entry points in the repository, then determine whether context-menu behavior is supported and what scope an implementation would require. Done would be a decided, documented approach or a complete context-menu feature with tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.