Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clipboard keys #5352

Merged
merged 15 commits into from
Dec 6, 2024
Merged

Clipboard keys #5352

merged 15 commits into from
Dec 6, 2024

Conversation

willmcgugan
Copy link
Collaborator

  • Implements cut/copy/paste with ctrl+x, ctrl+c, and ctrl+v
  • Binds quit to ctrl+q (previously ctrl+c)

Copy link
Member

@darrenburns darrenburns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just minor things

src/textual/widgets/_input.py Outdated Show resolved Hide resolved
src/textual/widgets/_input.py Outdated Show resolved Hide resolved
src/textual/widgets/_text_area.py Show resolved Hide resolved
@willmcgugan willmcgugan merged commit ebdd6ef into main Dec 6, 2024
23 checks passed
@willmcgugan willmcgugan deleted the clipboard branch December 6, 2024 17:15
@darrenburns
Copy link
Member

I tested and "command + x" does cut the line for me in VSCode and on an online version of VSCode. I think we should revert ctrl+x with no selection to cut the line instead of it doing nothing.

@willmcgugan
Copy link
Collaborator Author

It doesn't seem to cut the line for me. Does nothing AFAICT.

Not apposed to changing it.

@darrenburns
Copy link
Member

You must have some config/plugin/keybind override going on as I tested it on an online VSCode with no config and it cut. I'll PR that as it'll just take a moment.

@darrenburns
Copy link
Member

Turns out the new binding wasn't working anyway:

Binding("ctrl+shift+x", "delete_line", "Delete line", show=False),

Should be ctrl+X :)

@willmcgugan
Copy link
Collaborator Author

Really? textual keys reports ctrl+shift+x

@darrenburns
Copy link
Member

Uh oh
image

@willmcgugan
Copy link
Collaborator Author

Very strange! is that running in VSCode?

@darrenburns
Copy link
Member

darrenburns commented Dec 10, 2024

iTerm2 3.5.10 😬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants