On Debian 13 GNOME how to disable middle touchpad button behaving as *Paste*?
Jun 17, 1:05pm

To disable the middle touchpad button paste behavior on Debian 13 GNOME, use one of these methods:


🔹 Method 1: Disable GTK Middle-Click Paste (Recommended)

This disables middle-click paste in all GTK-based applications (covers most GUI apps in GNOME):

bash
gsettings set org.gnome.desktop.interface gtk-enable-primary-paste false

Effect: Middle-click paste stops working in GTK apps (e.g., Terminal, Files, Text Editor). Limitation: Non-GTK apps (e.g., Firefox, some Qt apps) may still paste.


🔹 Method 2: Disable Middle Button via xinput (X11 Only)

If you're using X11 (not Wayland), disable the middle button entirely:

  1. Find your touchpad name:

    bash
    xinput list

    Example output:

    text
    ⎜   ↳ Synaptics TM3052-003 Touchpad   id=12   [slave  pointer  (14)]
  2. List its properties:

    bash
    xinput list-props "Synaptics TM3052-003 Touchpad"

    Look for:

    text
    libinput Middle Emulation Enabled (320):    1
  3. Disable middle emulation:

    bash
    xinput set-prop "Synaptics TM3052-003 Touchpad" "libinput Middle Emulation Enabled" 0

    Note: Replace the name with your touchpad's exact name.

  4. Make it permanent (create an X11 config file):

    bash
    sudo nano /etc/X11/xorg.conf.d/40-libinput.conf

    Add:

    ini
    Section "InputClass"
        Identifier "libinput touchpad catchall"
        MatchIsTouchpad "on"
        Option "MiddleEmulation" "disabled"
    EndSection

    Save, then restart X11 (or reboot).


🔹 Method 3: For Wayland (Default in GNOME)

Wayland doesn’t use xinput. Instead:

  1. Use the GTK setting (Method 1) — this covers most apps.
  2. For libinput-based touchpads, create a quirk file:
    bash
    sudo mkdir -p /etc/libinput
    sudo nano /etc/libinput/local-overrides.quirks
    Add:
    ini
    [Disable Middle Button]
    MatchUdevType=touchpad
    AttrEventCode=BTN_MIDDLE
    Attr=0
    Then restart your session (log out and back in).

🔍 Verify Your Session Type

To check if you're using X11 or Wayland:

bash
echo $XDG_SESSION_TYPE
  • If it returns x11, use Method 2.
  • If it returns wayland, use Method 1 + 3.
Jun 17, 1:05pm

This is a shared conversation and may include unverified content that doesn't reflect Mistral AI's views. Login to resume chatting.

Vibe can make mistakes. Check answers. Learn more