scroll-emulation icon indicating copy to clipboard operation
scroll-emulation copied to clipboard

Warning

Open com2 opened this issue 2 years ago • 2 comments

Thank you for the effort to make this work. Still want to use my antique marblemouse without scrollwheel until it finally gives the ghost.

Did never compile anything at this level. Response after running your compile command in Debian 12 after installing packages build-essential and libinput-dev:

hook.c: In function ‘libinput_device_get_name’:
hook.c:8:3: warning: implicit declaration of function ‘set_scroll_emulation’ [-Wimplicit-function-declaration]
    8 |   set_scroll_emulation(device); // Inject the code to set scrolling emulation
      |   ^~~~~~~~~~~~~~~~~~~~
hook.c: At top level:
hook.c:14:6: warning: conflicting types for ‘set_scroll_emulation’; have ‘void(struct libinput_device *)’
   14 | void set_scroll_emulation(struct libinput_device *device) {
      |      ^~~~~~~~~~~~~~~~~~~~
hook.c:8:3: note: previous implicit declaration of ‘set_scroll_emulation’ with type ‘void(struct libinput_device *)’
    8 |   set_scroll_emulation(device); // Inject the code to set scrolling emulation
      |   ^~~~~~~~~~~~~~~~~~~~

Are these warnings normal or should I be worried?

com2 avatar Jun 14 '23 17:06 com2

I placed hook.so in /usr/local/lib and added according to instructions in the file /etc/profile.d/libinput.sh: export LD_PRELOAD="$LD_PRELOAD /usr/local/lib/hook.so" I rebooted but the right mouse button does cause it to function as scroll-wheel. What am I missing?

com2 avatar Jun 14 '23 19:06 com2

Hello, export LD_PRELOAD="$LD_PRELOAD /usr/local/lib/hook.so" didn't work for me too.

I've found the solution in a closed issue: https://github.com/PeterCxy/scroll-emulation/issues/2

You have to put the path to you hook.so file in the /etc/ld.so.preload file. Eg:

sudo nano /etc/ld.so.preload and put /usr/local/lib/hook.so there.

If you don't have /etc/ld.so.preload file, then you have to create one. I had to create one in my Debian Bookworm install. And yes I had also those warning on compile process.

Hope this helps, good luck.

waldhef avatar Aug 22 '24 15:08 waldhef