GithubHelp home page GithubHelp logo

gaul / libinput-force-middle-click-emulation Goto Github PK

View Code? Open in Web Editor NEW
20.0 3.0 3.0 2 KB

force libinput to emulate a middle click when pressing left and right buttons simultaneously

License: MIT License

Makefile 15.22% C 84.78%
libinput wayland middle-click ld-preload mutter

libinput-force-middle-click-emulation's Introduction

libinput-force-middle-click-emulation

Force libinput to emulate a middle click when pressing left and right buttons simultaneously. This allows GNOME Wayland (and other Wayland compositors that do not expose libinput configuration) to configure the existing libinput functionality.

Information for users of mutter version 3.36.1 or newer

This is not needed anymore if you use mutter version 3.36.1 or newer. There it is possible to directly enable middle click emulation:

gsettings set org.gnome.desktop.peripherals.mouse middle-click-emulation true

Installation

Build hook.so then configure libinput to LD_PRELOAD it:

make
echo 'export LD_PRELOAD="$LD_PRELOAD /path/to/hook.so"' | sudo tee -a /etc/profile.d/libinput.sh

Log out and log in to enable.

References

License

  • MIT

libinput-force-middle-click-emulation's People

Contributors

gaul avatar goggle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

libinput-force-middle-click-emulation's Issues

Make project more generic?

I recently saw @PatPennell's libinput-disable-on-click-scrolling project/fork and wonder if this project should grow in scope to allow further configuration. Some symbols like libinput_device_config_middle_emulation_set_enabled and libinput_device_config_scroll_set_button can be looked up at run-time via dlsym but others like LIBINPUT_CONFIG_MIDDLE_EMULATION_ENABLED are enums.

Stopped working in Gnome 3.36.1

Since I've found the workaround (issue #1) it really worked great for a long time.
But now it stopped working in gnome-shell 3.36.1 (it still worked with gnome-shell 3.36.0) even when the workaround is applied.
@gaul Do you know if something recently changed in Gnome, that prevents libinput-middle-click-emulation from working correctly?

Middle click emulation stopped working

Hi,

Since today, this does not work anymore for me...
I'm using it on Arch Linux for several months now without any problem, but suddenly it stopped working.

Running the compiled hook.so directly gives:

fish: “./hook.so” terminated by signal SIGSEGV (Address boundary error)

I don't know if it used to give another output.

I will try to downgrade some packages to see if I can narrow down the cause of the problem.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.