Clipboard does not work properly on linux

There was a similar issue opened for this, but it didn’t seem to address the core issue:

Background:

Linux has two clipboard buffers, CLIPBOARD and PRIMARY. The PRIMARY is not used by all people, but it is a core part of the operations, and many linux applications do not support the CLIPBOARD at all.

CLIPBOARD uses the normal cut-and-paste hotkeys/menuitems, where PRIMARY is automatically reflected in what is currently highlighted.

The issue.

Today, if I highlight inside obsidian the contents are automatically copied to the PRIMARY buffer, which is great. However, if the PRIMARY buffer has contents there is no way to paste it into obsidian. Normally this would be with middle button.

Obsidian chose to make middle button a core action in the application. That is not uncommon. Chrome and firefox has done that for years. However, unlike applications like chrome and firefox, obsidian prevents middle button from pasting primary where we are in a keyboard input context.

Proposed solution:

  1. the optimal fix: keep middle button for opening new tabs or whatever it is intended for, but if the target of the middle button is blank space on the window (i.e. there is no text there) then it should paste the PRIMARY buffer.

  2. configuration setting: while many people don’t know or don’t care about PRIMARY. It working should be a default. Therefore on linux, all actions that currently do something else when middle button is clicked should have to use shift-middle button. There should be a setting for those people who don’t use PRIMARY and/or who use obsidian on other platforms to enable middle button for action.

Summary:

This application deviates from every standard behavior on linux desktop apps, and while many users don’t notice, it is a show stopper from people who depend on it (many applications only suppport PRIMARY buffer). I would encourage the developers to enable the proper fix (#1) or at least provide a workaround (#2).

To further document the importance of this on Linux desktops, there are two major desktop enviroments. KDE which uses QT and GNOME which uses GTK. They have all opted into using the PRIMARY selection capability on wayland, which has a common wayland extension.

embarrising, the issue was something wrong on my desktop. this is working fine now.

Hi @toppk ,
I would like to get to know how you have solved your issue.

I am asking because I currently do have the same issue with copy-pasting by usage of the keyboard shortcuts.

How to reproduce:

Usage of keyboard shortcuts (CTRL + C and CTRL + V).

  1. Copy a text into clipboard
  2. Paste the text
  3. Copy part of a text
  4. paste via CTRL + V from clipboard

I made a short screenshot which shows the bug:
simplescreenrecorder