Why not login to Qiita and try out its useful features?

We'll deliver articles that match you.

You can read useful information later.

1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

KDE Plasma (Wayland) でミドルクリックでのペーストを無効化

Posted at

Wayland環境にで、ミドルクリックによるペーストを無効化するのに苦戦したので共有

環境

  • Arch Linux
  • KDE Plasma 6.1.5 (Wayland)

解決策

ネイティブWaylandアプリケーションの場合

  1. KDEのシステム設定を開く
  2. 「ワークスペース」→「全般的な挙動」を選択
  3. 「中クリック: 選択したテキストを貼り付ける」のチェックを外す
  4. システムを再起動

Xwaylandアプリケーションの場合

(例: Discordなど)

1. XMousePasteBlockをインストール

$ yay -S XMousePasteBlock

xmousepasteblockの方だとビルドに失敗したので、
xmousepasteblock-gitを選んだほうがいいかもしれない。

2. systemdにサービスを登録する

/etc/systemd/systemmousepasteblock.serviceを作成

mousepasteblock.service
[Unit]
Description=Userspace tool to disable middle mouse button paste in Xorg.

[Service]
ExecStart=/usr/bin/xmousepasteblock

[Install]
WantedBy=multi-user.target

3. システムを再起動

Firefoxの場合

about:configmiddlemouse.pastefalseに設定。

おまけ

ミドルクリックでスクロールできるようにする方法。

Firefoxの場合

Firefoxの設定を開き「スクロール」で検索し、
「自動スクロール機能を使用する」を有効化。

Electronソフトウェアの場合

起動する際の引数に--enable-blink-features=MiddleClickAutoscrollを追加する。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up

Qiita Conference 2025 will be held!: 4/23(wed) - 4/25(Fri)

Qiita Conference is the largest tech conference in Qiita!

Keynote Speaker

ymrl、Masanobu Naruse, Takeshi Kano, Junichi Ito, uhyo, Hiroshi Tokumaru, MinoDriven, Minorun, Hiroyuki Sakuraba, tenntenn, drken, konifar

View event details
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?