Skip to content

Use secret hint to prevent copy-then-type emoji from appearing in clipboard history - #28

Merged
alex1701c merged 2 commits into
alex1701c:masterfrom
RealOrangeOne:avoid-clipboard-pollution
Oct 11, 2026
Merged

alex1701c merged 2 commits into
alex1701c:masterfrom
RealOrangeOne:avoid-clipboard-pollution

Conversation

@RealOrangeOne

Copy link
Copy Markdown
Contributor

Fixes #27

This PR makes 2 notable changes to the "paste emoji" option (Shift-Return):

  • Emoji now have a sensitive hint, which prevents them showing up in clipboard managers (eg Klipper)
  • Emoji are cleared shortly after being pasted, restoring what was in the clipboard before

This combination makes the fact the clipboard is used almost an implementation detail, since there should be no difference before and after.

I've tested this working on Plasma 6 under Wayland.

@RealOrangeOne

Copy link
Copy Markdown
Contributor Author

@alex1701c I'm not sure what the issue with CI is, although because it passes on other platforms I'm thinking it's an issue with the CI pipeline rather than this PR.

Comment thread src/runner/emojirunner.cpp Outdated
QApplication::clipboard()->clear();

// A second ctrl-v is needed to bring whatever was in the clipboard back in.
// For some reason.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

That sounds a bit suspicious. I would like to know more why it does not work.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I agree. I got it working on a single machine and left it. I'll see how it behaves on a few other installations and report back.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

And chance you got time to do that? :)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It dropped to the bottom of my list, but I'll try and look again over the next few days.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@alex1701c I couldn't reproduce whatever issue I had before. It now reliably works across 2 machines without the extra paste.

@RealOrangeOne
RealOrangeOne requested a review from alex1701c July 31, 2026 15:54
@alex1701c
alex1701c merged commit 61419b7 into alex1701c:master Oct 11, 2026
@RealOrangeOne
RealOrangeOne deleted the avoid-clipboard-pollution branch October 12, 2026 09:00
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.

Type directly without clipboard

2 participants