Skip to content

Instantly share code, notes, and snippets.

@spotman
Forked from marceloperini/50-marblemouse.conf
Created June 16, 2021 07:34
Show Gist options
  • Save spotman/e3a037bacb7544cac8dc9d77d946e8ee to your computer and use it in GitHub Desktop.
Save spotman/e3a037bacb7544cac8dc9d77d946e8ee to your computer and use it in GitHub Desktop.

Revisions

  1. Philippe Ivaldi revised this gist Nov 7, 2016. No changes.
  2. pivaldi revised this gist Nov 7, 2016. 1 changed file with 11 additions and 9 deletions.
    20 changes: 11 additions & 9 deletions 50-marblemouse.conf
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,11 @@
    # put this file under /usr/share/X11/xorg.conf.d/
    # The default setting for middle-button-enabled in Gnome is false.
    # Since Gnome settings are applied after xorg settings, this results in middle button emulation disabled. To fix this, run the following in a terminal:
    #
    # gsettings set org.gnome.settings-daemon.peripherals.mouse middle-button-enabled true
    #
    # This needs to be done only once for each user - Gnome remembers this setting between logins.
    # put this file under /usr/share/X11/xorg.conf.d/50-marblemouse.conf

    # Large button left : normal click
    # Both large buttons : middle click
    # Large button right : right-click
    # Small button left : browser back
    # Small button left+ball : scroll (verticaly or horizontally)
    # Small button right : browser forward


    Section "InputClass"
    @@ -15,10 +16,11 @@ Section "InputClass"
    Driver "evdev"
    Option "SendCoreEvents" "true"

    # Option "ButtonMapping" "1 8 3 4 5 6 7 2 9" # This mapping is tricky
    Option "Buttons" "9"
    Option "ButtonMapping" "1 8 3 4 5 6 7 2 9"
    Option "EmulateWheel" "true"
    Option "EmulateWheelButton" "8"
    Option "EmulateWheelButton" "8 8"
    Option "YAxisMapping" "4 5"
    Option "XAxisMapping" "6 7"
    Option "Emulate3Buttons" "true"
    EndSection
  3. @weakish weakish created this gist Sep 13, 2013.
    24 changes: 24 additions & 0 deletions 50-marblemouse.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    # put this file under /usr/share/X11/xorg.conf.d/
    # The default setting for middle-button-enabled in Gnome is false.
    # Since Gnome settings are applied after xorg settings, this results in middle button emulation disabled. To fix this, run the following in a terminal:
    #
    # gsettings set org.gnome.settings-daemon.peripherals.mouse middle-button-enabled true
    #
    # This needs to be done only once for each user - Gnome remembers this setting between logins.


    Section "InputClass"
    Identifier "Marble Mouse"
    MatchProduct "Logitech USB Trackball"
    MatchIsPointer "on"
    MatchDevicePath "/dev/input/event*"
    Driver "evdev"
    Option "SendCoreEvents" "true"

    Option "Buttons" "9"
    Option "ButtonMapping" "1 8 3 4 5 6 7 2 9"
    Option "EmulateWheel" "true"
    Option "EmulateWheelButton" "8"
    Option "YAxisMapping" "4 5"
    Option "XAxisMapping" "6 7"
    EndSection